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