| 1 | import { codegenNativeComponent, type CodegenTypes } from "react-native"; |
| 2 | import type { ColorValue, ViewProps } from "react-native"; |
| 3 | |
| 4 | type TextDecorationLine = "none" | "underline" | "line-through"; |
| 5 | |
| 6 | type TextDecorationStyle = "solid" | "double" | "dotted" | "dashed"; |
| 7 | |
| 8 | export type NativeFontWeight = |
| 9 | | "normal" |
| 10 | | "bold" |
| 11 | | "ultraLight" |
| 12 | | "light" |
| 13 | | "medium" |
| 14 | | "semibold" |
| 15 | | "heavy"; |
| 16 | |
| 17 | type FontStyle = "normal" | "italic"; |
| 18 | |
| 19 | type TextAlign = "auto" | "left" | "right" | "center" | "justify"; |
| 20 | |
| 21 | interface 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 | |
| 37 | export default codegenNativeComponent<NativeProps>("T3SourceTextRun", { |
| 38 | excludedPlatforms: ["android"], |
| 39 | }); |