MCPcopy
hub / github.com/Shopify/restyle / createBox

Function createBox

src/createBox.ts:60–78  ·  view source on GitHub ↗
(
  BaseComponent: React.ComponentType<any> = View,
)

Source from the content-addressed store, hash-verified

58];
59
60const createBox = <
61 Theme extends BaseTheme,
62 Props = React.ComponentProps<typeof View> & {children?: React.ReactNode},
63 EnableShorthand extends boolean = true,
64>(
65 BaseComponent: React.ComponentType<any> = View,
66) => {
67 return createRestyleComponent<
68 BoxProps<Theme, EnableShorthand> &
69 Omit<Props, keyof BoxProps<Theme, EnableShorthand>>,
70 Theme
71 >(
72 boxRestyleFunctions as RestyleFunctionContainer<
73 BoxProps<Theme, EnableShorthand>,
74 Theme
75 >[],
76 BaseComponent,
77 );
78};
79
80export default createBox;

Callers 1

App.tsxFile · 0.85

Calls 1

createRestyleComponentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…