UNPKG

@selfcommunity/react-theme-default

Version:

Default theme to use with SelfCommunity TS library

36 lines (35 loc) 1.46 kB
import { getContrastRatio } from '@mui/material'; const Component = { styleOverrides: { root: ({ theme, followers }) => ({ padding: theme.spacing(), '& .MuiAvatarGroup-root': { '&:not(.SCAvatarGroupSkeleton-root) .MuiAvatar-root': { '&.MuiAvatar-colorDefault': { marginLeft: 0, backgroundColor: 'transparent', color: theme.palette.primary.main, border: '0 none', borderRadius: 0, padding: 1 } }, '& .MuiAvatar-root': { height: theme.selfcommunity.user.avatar.sizeSmall, border: getContrastRatio(theme.palette.background.default, theme.palette.common.white) > 4.5 ? '1px solid rgba(255, 255, 255, 0.12)' : `1px solid ${theme.palette.common.white}`, fontSize: '0.7rem', '&:first-of-type': { width: followers > 3 ? 'auto' : theme.selfcommunity.user.avatar.sizeSmall }, '&:not(:first-of-type)': { width: theme.selfcommunity.user.avatar.sizeSmall } } } }), dialogRoot: () => ({}) } }; export default Component;