1import { codegenNativeComponent, type CodegenTypes } from "react-native";
2import type { ColorValue, ViewProps } from "react-native";
3
4type TextDecorationLine = "none" | "underline" | "line-through";
5
6type TextDecorationStyle = "solid" | "double" | "dotted" | "dashed";
7
8export type NativeFontWeight =
9 | "normal"
10 | "bold"
11 | "ultraLight"
12 | "light"
13 | "medium"
14 | "semibold"
15 | "heavy";
16
17type FontStyle = "normal" | "italic";
18
19type TextAlign = "auto" | "left" | "right" | "center" | "justify";
20
21interface NativeProps extends ViewProps {
22 text: string;
23 color?: ColorValue;
24 fontSize?: CodegenTypes.Float;
25 fontStyle?: CodegenTypes.WithDefault<FontStyle, "normal">;
26 fontWeight?: CodegenTypes.WithDefault<NativeFontWeight, "normal">;
27 fontFamily?: string;
28 letterSpacing?: CodegenTypes.Float;
29 lineHeight?: CodegenTypes.Float;
30 textDecorationLine?: CodegenTypes.WithDefault<TextDecorationLine, "none">;
31 textDecorationStyle?: CodegenTypes.WithDefault<TextDecorationStyle, "solid">;
32 textDecorationColor?: ColorValue;
33 textAlign?: CodegenTypes.WithDefault<TextAlign, "auto">;
34 shadowRadius?: CodegenTypes.WithDefault<CodegenTypes.Float, 0>;
35}
36
37export default codegenNativeComponent<NativeProps>("T3SourceTextRun", {
38 excludedPlatforms: ["android"],
39});