import { forwardRef, type HTMLAttributes } from 'react';
import { css, cx } from 'styled-system/css';
export interface DividerProps extends HTMLAttributes {
/** Optional center label text (e.g. "OR") */
label?: string;
/** Orientation of the divider */
orientation?: 'horizontal' | 'vertical';
}
export const Divider = forwardRef(
function Divider(
{ label, orientation = 'horizontal', className, ...props },
ref,
) {
if (orientation === 'vertical') {
return (
{label && (
{label}
)}
{label && (
)}
);
}
if (label) {
return (
);
}
return (
);
},
);