UNPKG

react-fabric-canvas-designer

Version:

A React-based wrapper for Fabric.js to create interactive and customizable canvas-based designs. This library provides tools for drawing, editing, and managing objects on a canvas with React-friendly APIs.

8 lines (7 loc) 610 B
import { jsx as _jsx } from "react/jsx-runtime"; const InputSelect = ({ value, onChange, options }) => { return _jsx("div", { className: "py-2 px-3 inline-block bg-white border border-gray-200 rounded-lg dark:text-white dark:bg-neutral-900 dark:border-neutral-700", children: _jsx("select", { value: value.value, onChange: e => onChange(options.find(option => option.value == e.target.value) || options[0]), children: options.map((option) => { return _jsx("option", { value: option.value, children: option.displayValue }, option.value); }) }) }); }; export default InputSelect;