✨ feat(atoms): add Publications entry

This commit is contained in:
2024-02-17 10:30:42 +01:00
parent 2e6ce3941a
commit 54d822756a
2 changed files with 39 additions and 0 deletions
@@ -0,0 +1,38 @@
import React from 'react'
import { Box, SxProps, Theme, Typography, TypographyProps } from '@mui/material'
import { ExtrernalIconLink } from '..'
type AwardEntryProps = {
year: string | number
title: string
authors: React.ReactNode
location: string
link?: string
titleProps?: TypographyProps
Component?: React.ElementType
sx?: SxProps<Theme>
}
const Publication = ({ Component = Box, ...props }: AwardEntryProps) => {
return (
<Component sx={{ pl: 2, ...props.sx }}>
<Box display="flex" gap={1} alignItems="flex-start">
<Typography variant="subtitle1" color="primary.main">
{props.year}
</Typography>
<Typography color="text.secondary">
{props.authors},{' '}
<Typography component="span" color="text.primary">
<b>{props.title}</b>
</Typography>
, In: {props.location}
{typeof props.link !== 'undefined' && (
<ExtrernalIconLink size="small" fontSize="small" href={props.link} sx={{ color: 'text.secondary' }} />
)}
</Typography>
</Box>
</Component>
)
}
export default Publication
@@ -0,0 +1 @@
export { default } from './Publication'