UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 979 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/Switch/Switch.css');const e=require("./index.cjs278.js"),r=require("./index.cjs495.js"),h=require("./index.cjs219.js");;/* empty css */const l=require("./index.cjs72.js"),m=require("./index.cjs80.js"),a=({id:t=void 0,label:s="Visibile",checked:i=!1,setValue:n,name:o,disabled:x=!1,className:u})=>e.jsxRuntimeExports.jsxs(h.Row,{alignItems:"center",gap:"x16",className:u,children:[s&&e.jsxRuntimeExports.jsx("label",{className:"text-muted fs-6 fw-bold",htmlFor:t,children:s}),e.jsxRuntimeExports.jsx(r.Root,{id:t,disabled:x,checked:i,onCheckedChange:c=>{n(o??"",c)},className:"ui-switch","aria-label":s,children:e.jsxRuntimeExports.jsx(r.Thumb,{className:"ui-switch-thumb",children:i?e.jsxRuntimeExports.jsx(l.CheckIcon,{width:12,height:12}):e.jsxRuntimeExports.jsx(m.Close,{width:12,height:12})})})]});exports.Switch=a; //# sourceMappingURL=index.cjs248.js.map