import type { HTMLAttributes, ReactNode } from 'react';
import { cx } from '../utils/cx';
export interface DividerProps extends HTMLAttributes {
orientation?: 'horizontal' | 'vertical';
/** Optional centred label, e.g. "or". */
label?: ReactNode;
/** Extra vertical rhythm around a horizontal divider. */
spacing?: 'none' | 'sm' | 'md' | 'lg';
}
export function Divider({
orientation = 'horizontal',
label,
spacing = 'md',
className,
...rest
}: DividerProps) {
if (label && orientation === 'horizontal') {
return (
{label}
);
}
return (
);
}