UNPKG

@teamsparta/stack-divider

Version:
47 lines (44 loc) 991 B
import { StyledDivider, __objRest, __spreadValues } from "./chunk-BO5QJFSD.mjs"; // src/Divider.tsx import { primitiveColor } from "@teamsparta/stack-tokens"; import { forwardRef } from "react"; import { jsx } from "@emotion/react/jsx-runtime"; var DEFAULT_ORIENTATION = "horizontal"; var Divider = forwardRef(function Divider2(_a, ref) { var _b = _a, { as, size = 1, color = primitiveColor.neutral[80], decorative = false, orientation = DEFAULT_ORIENTATION, isFlexItem = false } = _b, restProps = __objRest(_b, [ "as", "size", "color", "decorative", "orientation", "isFlexItem" ]); const semanticProps = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation }; return /* @__PURE__ */ jsx( StyledDivider, __spreadValues(__spreadValues({ as, ref, size, color, orientation, isFlexItem }, semanticProps), restProps) ); }); export { Divider };