Portal/rsconcept/frontend/src/components/ui/Divider.tsx
IRBorisov 2759f10d09
Some checks failed
Backend CI / build (3.12) (push) Has been cancelled
Frontend CI / build (18.x) (push) Has been cancelled
Initial commit
2024-06-07 20:17:03 +03:00

27 lines
511 B
TypeScript

import clsx from 'clsx';
import { CProps } from '@/components/props';
interface DividerProps extends CProps.Styling {
vertical?: boolean;
margins?: string;
}
function Divider({ vertical, margins = 'mx-2', className, ...restProps }: DividerProps) {
return (
<div
className={clsx(
margins, //prettier: split-lines
className,
{
'border-x': vertical,
'border-y': !vertical
}
)}
{...restProps}
/>
);
}
export default Divider;