ConceptPortal-public/rsconcept/frontend/src/components/ui/Divider.tsx

20 lines
323 B
TypeScript
Raw Normal View History

import clsx from 'clsx';
2023-07-20 17:11:03 +03:00
interface DividerProps {
2023-12-28 14:04:44 +03:00
vertical?: boolean;
margins?: string;
2023-07-20 17:11:03 +03:00
}
function Divider({ vertical, margins = 'mx-2' }: DividerProps) {
2023-07-18 14:55:40 +03:00
return (
2023-12-28 14:04:44 +03:00
<div
className={clsx(margins, {
'border-x': vertical,
'border-y': !vertical
})}
/>
);
2023-07-18 14:55:40 +03:00
}
2023-12-28 14:04:44 +03:00
export default Divider;