UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

15 lines 824 B
import { jsx as _jsx } from "react/jsx-runtime"; import React from 'react'; import { PillSelectorControlled } from './pillSelectorControlled'; import { PillSelectorType } from './types/pillSelectorType'; const PillSelectorUnControlledComponent = ({ type = PillSelectorType.SELECTOR_MULTIPLE, defaultValue, onChange, ...props }, ref) => { const [value, setValue] = React.useState(defaultValue); const handleChange = (newValue) => { setValue(newValue); onChange?.(newValue); }; return (_jsx(PillSelectorControlled, { ref: ref, type: type, value: value, onChange: handleChange, ...props })); }; export const PillSelectorUnControlled = React.forwardRef(PillSelectorUnControlledComponent); export { PillSelectorUnControlled as PillSelectorV2 }; //# sourceMappingURL=pillSelectorUnControlled.js.map