import React from 'react'; import { StyleSheet, Text, useColorScheme, View } from 'react-native'; import { SvgXml } from 'react-native-svg'; import { learnihonColors } from '../assets/colors'; interface detailRadicalProps { character: string, icon: string } const DetailRadical = (props: detailRadicalProps) => { const detailRadicalStyle = useColorScheme() == 'light' ? detailRadicalStyle_light : detailRadicalStyle_dark; return ( {props.character} ); }; const detailRadicalStyle_light = StyleSheet.create({ container: { height: 30, width: 30, }, svg: { color: learnihonColors.main }, radicalIcon: { position: "absolute" }, radicalText: { fontWeight: "bold", textAlign: "center", width: 30, height: 30, fontSize: 25 }, }) const detailRadicalStyle_dark = StyleSheet.create({ container: { height: 30, width: 30, }, svg: { color: learnihonColors.main }, radicalIcon: { position: "absolute" }, radicalText: { fontWeight: "bold", textAlign: "center", width: 30, height: 30, fontSize: 25, color: "white" }, }) export default DetailRadical;