UNPKG

react-garden

Version:

React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.

32 lines (25 loc) 740 B
// ** MUI Imports import MuiBadge from '@mui/material/Badge' // ** Hooks Imports import useBgColor from '~/@core/hooks/useBgColor' const Badge = props => { // ** Props const { sx, skin, color } = props // ** Hook const bgColors = useBgColor() const colors = { primary: { ...bgColors.primaryLight }, secondary: { ...bgColors.secondaryLight }, success: { ...bgColors.successLight }, error: { ...bgColors.errorLight }, warning: { ...bgColors.warningLight }, info: { ...bgColors.infoLight } } return ( <MuiBadge {...props} sx={skin === 'light' && color ? Object.assign({ '& .MuiBadge-badge': colors[color] }, sx) : sx} /> ) } export default Badge