index.js 1.4 KB

1234567891011121314151617181920212223242526272829
  1. var $9g4ps$react = require("react");
  2. function $parcel$export(e, n, v, s) {
  3. Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
  4. }
  5. $parcel$export(module.exports, "useDirection", () => $cc45c1b701a63adc$export$b39126d51d94e6f3);
  6. $parcel$export(module.exports, "Provider", () => $cc45c1b701a63adc$export$2881499e37b75b9a);
  7. $parcel$export(module.exports, "DirectionProvider", () => $cc45c1b701a63adc$export$c760c09fdd558351);
  8. const $cc45c1b701a63adc$var$DirectionContext = /*#__PURE__*/ $9g4ps$react.createContext(undefined);
  9. /* -------------------------------------------------------------------------------------------------
  10. * Direction
  11. * -----------------------------------------------------------------------------------------------*/ const $cc45c1b701a63adc$export$c760c09fdd558351 = (props)=>{
  12. const { dir: dir , children: children } = props;
  13. return /*#__PURE__*/ $9g4ps$react.createElement($cc45c1b701a63adc$var$DirectionContext.Provider, {
  14. value: dir
  15. }, children);
  16. };
  17. /* -----------------------------------------------------------------------------------------------*/ function $cc45c1b701a63adc$export$b39126d51d94e6f3(localDir) {
  18. const globalDir = $9g4ps$react.useContext($cc45c1b701a63adc$var$DirectionContext);
  19. return localDir || globalDir || 'ltr';
  20. }
  21. const $cc45c1b701a63adc$export$2881499e37b75b9a = $cc45c1b701a63adc$export$c760c09fdd558351;
  22. //# sourceMappingURL=index.js.map