fix: tvos fixes

This commit is contained in:
Fredrik Burmester
2025-02-21 20:38:31 +01:00
parent 04dce9265b
commit b478fbb6bf
14 changed files with 337 additions and 318 deletions

View File

@@ -1,19 +1,27 @@
import React from "react";
import { TextProps } from "react-native";
import { Platform, TextProps } from "react-native";
import { UITextView } from "react-native-uitextview";
import { Text as RNText } from "react-native";
export function Text(
props: TextProps & {
uiTextView?: boolean;
}
) {
const { style, ...otherProps } = props;
return (
<UITextView
allowFontScaling={false}
style={[{ color: "white" }, style]}
{...otherProps}
/>
);
if (Platform.isTV)
return (
<RNText
allowFontScaling={false}
style={[{ color: "white" }, style]}
{...otherProps}
/>
);
else
return (
<UITextView
allowFontScaling={false}
style={[{ color: "white" }, style]}
{...otherProps}
/>
);
}