UNPKG

@stratakit/bricks

Version:

Small, modular components for StrataKit

27 lines (26 loc) 772 B
import { jsx } from "react/jsx-runtime"; import { Role } from "@ariakit/react/role"; import { Separator } from "@ariakit/react/separator"; import { forwardRef } from "@stratakit/foundations/secret-internals"; import cx from "classnames"; import { useInit } from "./~utils.useInit.js"; const Divider = forwardRef((props, forwardedRef) => { useInit(); const { presentational, bleed, ...rest } = props; const Comp = presentational ? Role : Separator; return /* @__PURE__ */ jsx(Comp, { ...rest, className: cx("\u{1F95D}Divider", props.className), "data-_sk-orientation": props.orientation, "data-_sk-bleed": bleed ? "true" : void 0, ref: forwardedRef }); }); var Divider_default = Divider; export { Divider_default as default };