@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
31 lines (30 loc) • 591 B
JavaScript
import { jsx, jsxs } from "react/jsx-runtime";
import { Switch } from "./index";
const SwitchPreset = ({
value,
onChange,
label,
defaultValue = false,
disabled,
...props
}) => {
return /* @__PURE__ */ jsxs(
Switch,
{
value,
onChange,
defaultValue,
disabled,
"aria-labelledby": "switchLabel",
...props,
children: [
/* @__PURE__ */ jsx(Switch.Thumb, {}),
/* @__PURE__ */ jsx(Switch.Label, { id: "switchLabel", children: label })
]
}
);
};
export {
SwitchPreset
};
//# sourceMappingURL=Preset.js.map