UNPKG

@wulperstudio/cms

Version:
33 lines 1.19 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["label", "switchProps", "labelPlacement", "margin"], _excluded2 = ["sx"], _excluded3 = ["sx"]; import React from 'react'; import { FormControlLabel } from '@mui/material'; import { IOSSwitch } from './styled'; import { jsx as _jsx } from "react/jsx-runtime"; var InputTrueFalse = function InputTrueFalse(_ref) { var label = _ref.label, switchProps = _ref.switchProps, labelPlacement = _ref.labelPlacement, margin = _ref.margin, props = _objectWithoutProperties(_ref, _excluded); var sx = props.sx, rest = _objectWithoutProperties(props, _excluded2); var _ref2 = switchProps || {}, sxSwitchProps = _ref2.sx, restSwitchProps = _objectWithoutProperties(_ref2, _excluded3); return /*#__PURE__*/_jsx(FormControlLabel, Object.assign({ control: /*#__PURE__*/_jsx(IOSSwitch, Object.assign({ sx: Object.assign({ m: 1 }, sxSwitchProps) }, restSwitchProps)), label: label || '', labelPlacement: labelPlacement, sx: Object.assign({ mx: margin || 0 }, sx) }, rest)); }; export default InputTrueFalse;