pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
6 lines (5 loc) • 834 B
JavaScript
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { MultiSelect } from '../../../../components';
const MultiSelectInputComponent = React.forwardRef(({ field, error, options, ...props }, ref) => (_jsxs(_Fragment, { children: [_jsx("label", { htmlFor: field.name, className: "block text-sm font-medium text-gray-700", children: field.label }), _jsx(MultiSelect, { className: "w-full border-gray-300 pb-5 disabled:text-gray-400 disabled:bg-gray-50 disabled:cursor-not-allowed", options: (options ?? []), value: props.value, defaultValue: props.value, disabled: field.disabled, onChange: props.onChange, tagPosition: "bottom" }), error && _jsx("p", { className: "mt-2 text-sm text-red-500", children: error.message })] })));
export default MultiSelectInputComponent;