import cx from "classnames"; import type { HTMLAttributes, ReactNode } from "react"; import React from "react"; import { Icon } from "../Icon"; export interface DividerProps extends Omit, "content"> { /** Custom content inside divider */ content?: ReactNode; /** Icon which will be rendered inside divider */ icon?: string; } const CLASS_ROOT = "divider"; const Divider: React.FC = ({ className, icon, content, ...other }) => { const classes = cx(CLASS_ROOT, className); const lineClass = `${CLASS_ROOT}__line`; const contentClass = `${CLASS_ROOT}__content`; return ( {(content || icon) && ( <> {content ?? (icon && )} > )} ); }; Divider.displayName = "Divider"; export { Divider };