UNPKG

@totalsoft/rocket-ui

Version:

A set of reusable and composable React components built on top of Material UI core for developing fast and friendly web applications interfaces.

14 lines (11 loc) 535 B
import MuiAccordionSummary from '@mui/material/AccordionSummary' import { styled } from '@mui/material/styles' import { includes } from 'ramda' import { AccordionSummaryProps } from './types' import { Theme } from '@mui/material' type StyledProps = { theme: Theme } & AccordionSummaryProps export const AccordionSummary = styled(MuiAccordionSummary, { shouldForwardProp: prop => !includes(prop, ['variant']) })(({ theme, variant }: StyledProps) => ({ ...(variant === 'filled' && { backgroundColor: theme.palette.grey[200] }) }))