MCPcopy Index your code
hub / github.com/Shopify/restyle / createText

Function createText

src/createText.ts:54–72  ·  view source on GitHub ↗
(
  BaseComponent: React.ComponentType<any> = Text,
)

Source from the content-addressed store, hash-verified

52];
53
54const createText = <
55 Theme extends BaseTheme,
56 Props = React.ComponentProps<typeof Text> & {children?: React.ReactNode},
57 EnableShorthand extends boolean = true,
58>(
59 BaseComponent: React.ComponentType<any> = Text,
60) => {
61 return createRestyleComponent<
62 TextProps<Theme, EnableShorthand> &
63 Omit<Props, keyof TextProps<Theme, EnableShorthand>>,
64 Theme
65 >(
66 textRestyleFunctions as RestyleFunctionContainer<
67 TextProps<Theme, EnableShorthand>,
68 Theme
69 >[],
70 BaseComponent,
71 );
72};
73
74export default createText;

Callers 2

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…