✨ feat(atoms): add Extracurricolar entry

This commit is contained in:
2024-02-17 10:30:59 +01:00
parent 54d822756a
commit e2e0940136
2 changed files with 28 additions and 0 deletions
@@ -0,0 +1,27 @@
import React from 'react'
import { Box, SxProps, Theme, Typography, TypographyProps } from '@mui/material'
type ExtracurricularProps = {
title: string
year?: string | number
titleProps?: TypographyProps
Component?: React.ElementType
sx?: SxProps<Theme>
}
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}
</Typography>
)}
</Component>
)
}
export default Extracurricular
@@ -0,0 +1 @@
export { default } from './Extracurricular'