personal-website/components/List.tsx
Filipe Medeiros 9a9638237f
feat: initial commit
Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
2023-12-03 12:25:52 +01:00

14 lines
276 B
TypeScript

import { FC, PropsWithChildren } from 'react'
export interface Props {
type: `${'un' | ''}ordered`
}
const List: FC<PropsWithChildren<Props>> = ({ type, children }) => {
const Tag = type === 'ordered' ? 'ol' : 'ul'
return <Tag>{children}</Tag>
}
export default List