@useloops/design-system
Version:
The official React based Loops design system
2 lines (1 loc) • 485 B
JavaScript
;var e=require("react/jsx-runtime"),l=require("merge-sx"),r=require("../FormControlLabel/FormControlLabel.js"),t=require("./StyledSwitch.js");module.exports=({sizing:a="sm",sx:n,inputRef:i,value:o,label:s,labelPlacement:u="start",fullWidth:m,onChange:b,internalChange:c,...x})=>e.jsx(r,{inputRef:i,checked:o,label:s,labelPlacement:u,control:e.jsx(t,{sizing:a}),onChange:(e,l)=>{b&&b(e,l),c&&c()},sx:l.mergeSx(m?{"& .MuiFormControlLabel-label":{width:"100%"}}:{},n),...x});