bc518174
王天杨
提交两个项目文件
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// 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
|