@useloops/design-system
Version:
The official React based Loops design system
2 lines (1 loc) • 686 B
JavaScript
import{jsx as o}from"react/jsx-runtime";import{useTheme as l,FormControlLabel as m}from"@mui/material";import{mergeSx as t}from"merge-sx";import{typographyVariantMap as r}from"../utils/typography.util.js";const e=({label:e,sx:a,...i})=>{const s=l(),d=e?s.custom.margin.md:0;return o(m,{label:e||"",sx:t({ml:0,"&.Mui-disabled":{color:s.custom.palette.text.disabled},"&.Mui-error":{color:s.custom.palette.text.negative},"& .MuiFormControlLabel-label":{ml:d,color:"inherit",fontSize:{xs:r.sm.body.md,sm:r.sm.body.md,md:r.sm.body.md,lg:r.lg.body.md,xl:r.lg.body.md}},"&.MuiFormControlLabel-labelPlacementStart":{"& .MuiFormControlLabel-label":{ml:0,mr:d}}},a),...i})};export{e as default};