@selfcommunity/react-theme-default
Version:
Default theme to use with SelfCommunity TS library
38 lines (37 loc) • 1.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const material_1 = require("@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: (0, material_1.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: () => ({})
}
};
exports.default = Component;