Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
20 lines
591 B
Plaintext
20 lines
591 B
Plaintext
// packages/react/direction/src/direction.tsx
|
|
import * as React from "react";
|
|
import { jsx } from "react/jsx-runtime";
|
|
var DirectionContext = React.createContext(void 0);
|
|
var DirectionProvider = (props) => {
|
|
const { dir, children } = props;
|
|
return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });
|
|
};
|
|
function useDirection(localDir) {
|
|
const globalDir = React.useContext(DirectionContext);
|
|
return localDir || globalDir || "ltr";
|
|
}
|
|
var Provider = DirectionProvider;
|
|
export {
|
|
DirectionProvider,
|
|
Provider,
|
|
useDirection
|
|
};
|
|
//# sourceMappingURL=index.mjs.map
|