index.mjs 1.3 KB

1234567891011121314151617181920212223
  1. import {createContext as $7Gjcd$createContext, createElement as $7Gjcd$createElement, useContext as $7Gjcd$useContext} from "react";
  2. const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ $7Gjcd$createContext(undefined);
  3. /* -------------------------------------------------------------------------------------------------
  4. * Direction
  5. * -----------------------------------------------------------------------------------------------*/ const $f631663db3294ace$export$c760c09fdd558351 = (props)=>{
  6. const { dir: dir , children: children } = props;
  7. return /*#__PURE__*/ $7Gjcd$createElement($f631663db3294ace$var$DirectionContext.Provider, {
  8. value: dir
  9. }, children);
  10. };
  11. /* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
  12. const globalDir = $7Gjcd$useContext($f631663db3294ace$var$DirectionContext);
  13. return localDir || globalDir || 'ltr';
  14. }
  15. const $f631663db3294ace$export$2881499e37b75b9a = $f631663db3294ace$export$c760c09fdd558351;
  16. export {$f631663db3294ace$export$b39126d51d94e6f3 as useDirection, $f631663db3294ace$export$2881499e37b75b9a as Provider, $f631663db3294ace$export$c760c09fdd558351 as DirectionProvider};
  17. //# sourceMappingURL=index.mjs.map