ICS React Native App
1import { StyleSheet } from "react-native";
2import { ThemedText } from "./themed-text";
3import { useThemeColor } from "@/hooks/use-theme-color";
4
5interface ThemedErrorProps {
6 children?: string | null;
7}
8
9export const ThemedError = ({ children }: ThemedErrorProps) => {
10 const textColor = useThemeColor({}, "red");
11
12 return children ? (
13 <ThemedText
14 type="small"
15 style={styles.text}
16 lightColor={textColor}
17 darkColor={textColor}
18 >
19 {children}
20 </ThemedText>
21 ) : null;
22};
23
24const styles = StyleSheet.create({
25 container: {},
26 text: {},
27});