Skip to content

Commit

Permalink
Remove Typography title wrap in Accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
st-angelo committed Oct 13, 2023
1 parent 998911a commit 830d994
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/surfaces/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ const AccordionItem: React.FC<AccordionProps> = ({
return (
<MuiAccordion defaultExpanded={isBoolean(defaultExpanded) ? defaultExpanded : false} {...rest}>
<AccordionSummary variant={'standard' as AccordionVariant} expandIcon={<ExpandMoreIcon />} {...summaryProps}>
<Typography variant="subtitle1" color={'textPrimary'}>
{title}
</Typography>
{typeof title === 'string' && (
<Typography variant="subtitle1" color={'textPrimary'}>
{title}
</Typography>
)}
{typeof title !== 'string' && title}
</AccordionSummary>
<AccordionDetails {...detailsProps}>
{content as ReactNode}
</AccordionDetails>
<AccordionDetails {...detailsProps}>{content as ReactNode}</AccordionDetails>
</MuiAccordion>
)
}
Expand Down

0 comments on commit 830d994

Please sign in to comment.