decord/alpha/source/modules/icymi/native/ICYMIContext.tsx
github-actions 97fd043558 chore: update source for alpha 347.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4941.js (118.4 MB)
2026-09-19 06:52:51 +00:00

28 lines
1.2 KiB
TypeScript

// Module ID: 16786
// Function ID: 16787
// Name: ICYMIContext
// Dependencies: [19, 21, 1478, 576, 2]
// Exports: ICYMIContextProvider, useICYMIContextConstructor
// Module 16786 (ICYMIContext)
import _mod19 from "module_19" /* 19 */;
import jsxProd from "jsxProd" /* 21 */;
import nativeDefault from "native" /* 576 */;
import useWindowDimensionsDefault from "useWindowDimensions" /* 1478 */;
import size from "module_2" /* 2 */;
const jsx = jsxProd.jsx;
const context = _mod19.createContext({ width: 0, margin: 0, inset: 0 });
const result = size.fileFinishedImporting("modules/icymi/native/ICYMIContext.tsx");
export const ICYMIContext = context;
export const useICYMIContextConstructor = function useICYMIContextConstructor() {
const bound = Math.min(useWindowDimensionsDefault().width, 480);
const PX_16 = nativeDefault.space.PX_16;
return { width: bound, margin: PX_16, inset: PX_16 + 38 };
};
export const ICYMIContextProvider = function ICYMIContextProvider(children) {
const bound = Math.min(useWindowDimensionsDefault().width, 480);
const PX_16 = nativeDefault.space.PX_16;
return <context.Provider value={{ width: bound, margin: PX_16, inset: PX_16 + 38 }}>{arg0.children}</context.Provider>;
};