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