UNPKG

@ariakit/react

Version:

Toolkit for building accessible web apps with React

38 lines (22 loc) 1.36 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _FRL55D2Tcjs = require('./FRL55D2T.cjs'); var _FHQLDZSWcjs = require('./FHQLDZSW.cjs'); var _5FQZLBJ7cjs = require('./5FQZLBJ7.cjs'); var _LZ6L3ECGcjs = require('./LZ6L3ECG.cjs'); // ../ariakit-react-components/dist/composite/composite-separator.js var TagName = "hr"; var useCompositeSeparator = _LZ6L3ECGcjs.createHook.call(void 0, function useCompositeSeparator2({ store, orientation: orientationProp, ...props }) { const context = _FHQLDZSWcjs.useCompositeScopedContext.call(void 0, ); store = store || context; _LZ6L3ECGcjs.invariant.call(void 0, store, process.env.NODE_ENV !== "production" && "CompositeSeparator must be wrapped in a Composite component."); const orientation = _5FQZLBJ7cjs.useStoreState.call(void 0, store, (state) => orientationProp != null ? orientationProp : state.orientation === "horizontal" ? "vertical" : "horizontal"); props = _FRL55D2Tcjs.useSeparator.call(void 0, { ...props, orientation }); return props; }); var CompositeSeparator = _LZ6L3ECGcjs.forwardRef.call(void 0, function CompositeSeparator2(props) { return _LZ6L3ECGcjs.createElement.call(void 0, TagName, useCompositeSeparator(props)); }); exports.useCompositeSeparator = useCompositeSeparator; exports.CompositeSeparator = CompositeSeparator;