@useloops/design-system
Version:
The official React based Loops design system
2 lines (1 loc) • 1.47 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@mui/material"),t=require("merge-sx"),n=require("../../BrandCore/primitiveVariables.js"),s=require("./components/emotion-good.js"),o=require("./components/emotion-great.js"),u=require("./components/emotion-meh.js"),a=require("./components/property-private.js"),i=require("./components/property-secure.js"),c=require("./components/understanding-good.js"),p=require("./components/understanding-great.js"),d=require("./components/understanding-low.js"),m=require("./components/understanding-unknown.js");const j={xl:3*n.base};exports.default=({color:n,name:l,size:x,sx:g,...q})=>{const h=r.useTheme(),w=x||j.xl,v=x||j.xl,y={sx:t.mergeSx({color:(e=>{switch(e){case"purple":return h.custom.palette.purple[500];case"peach":return h.custom.palette.peach[500];case"red":return h.custom.palette.red[500];default:return h.custom.palette.icon.disabled}})(n),height:w,width:v},g),...q};switch(l){case"emotion-meh":return e.jsx(u,{...y});case"emotion-good":return e.jsx(s,{...y});case"emotion-great":return e.jsx(o,{...y});case"understanding-unknown":return e.jsx(m,{...y});case"understanding-low":return e.jsx(d,{...y});case"understanding-good":return e.jsx(c,{...y});case"understanding-great":return e.jsx(p,{...y});case"property-secure":return e.jsx(i,{...y});case"property-private":return e.jsx(a,{...y});default:return e.jsx(e.Fragment,{})}},exports.iconSizeMap=j;