Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 39b884b

Browse files
authored
fix collapsible section subtitle position (#85)
1 parent e59720e commit 39b884b

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/components/form/sections/collapsibleSubSection.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
44
import Accordion, { AccordionProps } from '@mui/material/Accordion';
55
import AccordionDetails from '@mui/material/AccordionDetails';
66
import AccordionSummary from '@mui/material/AccordionSummary';
7+
import Stack from '@mui/material/Stack';
78
import useTheme from '@mui/material/styles/useTheme';
89
import Typography from '@mui/material/Typography/Typography';
910

@@ -46,12 +47,18 @@ export function CollapsibleSubSection({
4647
sx={{ backgroundColor: 'transparent', paddingLeft: 0 }}
4748
expandIcon={<ExpandMoreIcon />}
4849
>
49-
{title && <Typography variant="h6">{title}</Typography>}
50-
{subtitle && (
51-
<Typography variant="body2" sx={{ color: palette.text.secondary }}>
52-
{subtitle}
53-
</Typography>
54-
)}
50+
<Stack
51+
sx={{
52+
gap: 1,
53+
}}
54+
>
55+
{title && <Typography variant="h6">{title}</Typography>}
56+
{subtitle && (
57+
<Typography variant="body2" color={palette.text.secondary}>
58+
{subtitle}
59+
</Typography>
60+
)}
61+
</Stack>
5562
</AccordionSummary>
5663
<AccordionDetails sx={{ paddingLeft: 0 }}>
5764
<SubSection>{children}</SubSection>

0 commit comments

Comments
 (0)