Skip to main content

Divider

Code

components/Divider/index.tsx
import type { FC } from 'react'

export interface Props {
mode?: 'vertical' | 'horizontal'
}
interface State {}

const Divider: FC<Props> = ({ mode = 'horizontal' }) => {
if (mode === 'vertical') return <div className="w-px bg-gray-200" />
return <hr className="my-8" />
}

export default Divider

Props

NameTypeDefault
modevertical horizontalhorizontal

Example