14 lines
276 B
TypeScript
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
|