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
