UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

36 lines (35 loc) 1.22 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Group } from '@mantine/core'; import { useUncontrolled } from '@mantine/hooks'; import { DateRangePickerPresetSelect } from '../DateRangePicker/DateRangePickerPresetSelect.js'; import { EditableDateTimeRangePicker } from './EditableDateTimeRangePicker.js'; export const DateTimeRangePicker = ({ presets, value, defaultValue, onChange, ...otherProps })=>{ const [_value, handleChange] = useUncontrolled({ value, defaultValue, onChange, finalValue: [ null, null ] }); return /*#__PURE__*/ _jsxs(Group, { align: "center", children: [ /*#__PURE__*/ _jsx(EditableDateTimeRangePicker, { value: _value, onChange: handleChange, ...otherProps }), presets && /*#__PURE__*/ _jsx(DateRangePickerPresetSelect, { presets: presets, value: _value, onChange: handleChange, selectProps: { ml: 'sm' } }) ] }); }; //# sourceMappingURL=DateTimeRangePicker.js.map