UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

19 lines (14 loc) 796 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); const parts = require('./parts.cjs'); const switchIndicator = require('./switch-indicator.cjs'); function Switch(props) { const { children, ...rootProps } = props; return /* @__PURE__ */ jsxRuntime.jsxs(parts.SwitchParts.Root, { ...rootProps, children: [ /* @__PURE__ */ jsxRuntime.jsx(parts.SwitchParts.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(parts.SwitchParts.Thumb, { children: /* @__PURE__ */ jsxRuntime.jsx(switchIndicator.SwitchIndicator, {}) }) }), /* @__PURE__ */ jsxRuntime.jsx(parts.SwitchParts.Label, { children }), /* @__PURE__ */ jsxRuntime.jsx(parts.SwitchParts.HiddenInput, {}) ] }); } exports.Switch = Switch;