♻️ 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) => { const Extracurricular = ({ Component = Box, ...props }: ExtracurricularProps) => {
return ( return (
<Component sx={{ pl: 2, ...props.sx }} display="flex" columnGap={1} alignItems="flex-start"> <Component sx={{ ...props.sx }}>
<Typography variant="body1" flexGrow={1} {...props.titleProps}> <Box pl={2} display="flex" alignItems="flex-start" columnGap={1} flexWrap="wrap-reverse">
{props.title} <Typography variant="body1" flexGrow={1} {...props.titleProps}>
</Typography> {props.title}
{props.year && (
<Typography variant="subtitle1" color="primary.main">
{props.year}
</Typography> </Typography>
)} {props.year && (
<Typography variant="subtitle1" color="primary.main" flexGrow={0}>
{props.year}
</Typography>
)}
</Box>
</Component> </Component>
) )
} }