UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

22 lines (21 loc) 673 B
import { jsx as _jsx } from "react/jsx-runtime"; import { factory, Select as MantineSelect } from '@mantine/core'; import { readOnlyInputStyles } from '../ReadOnly/ReadOnlyInputStyles.js'; const ReadOnlySelect = MantineSelect.withProps({ styles: readOnlyInputStyles }); export const Select = factory((props, ref)=>{ if (props.readOnly && !props.disabled) { return /*#__PURE__*/ _jsx(ReadOnlySelect, { ref: ref, "data-readonly": true, ...props }); } return /*#__PURE__*/ _jsx(MantineSelect, { ref: ref, ...props }); }); Select.displayName = 'Select'; //# sourceMappingURL=Select.js.map