♻️ refactor(atoms): fix Extracurricolar alignment

This commit is contained in:
2024-02-17 10:58:36 +01:00
parent 22c69b321c
commit 9ea4f4251d
@@ -11,15 +11,17 @@ type ExtracurricularProps = {
const Extracurricular = ({ Component = Box, ...props }: ExtracurricularProps) => {
return (
<Component sx={{ pl: 2, ...props.sx }} display="flex" columnGap={1} alignItems="flex-start">
<Typography variant="body1" flexGrow={1} {...props.titleProps}>
{props.title}
</Typography>
{props.year && (
<Typography variant="subtitle1" color="primary.main">
{props.year}
<Component sx={{ ...props.sx }}>
<Box pl={2} display="flex" alignItems="flex-start" columnGap={1} flexWrap="wrap-reverse">
<Typography variant="body1" flexGrow={1} {...props.titleProps}>
{props.title}
</Typography>
)}
{props.year && (
<Typography variant="subtitle1" color="primary.main" flexGrow={0}>
{props.year}
</Typography>
)}
</Box>
</Component>
)
}