import { Platform, StyleSheet, View, type ViewProps } from "react-native"; import { GlassEffectView } from "react-native-glass-effect-view"; import { Text } from "./common/Text"; interface Props extends ViewProps { text?: string | number | null; variant?: "gray" | "purple"; iconLeft?: React.ReactNode; } export const Badge: React.FC = ({ iconLeft, text, variant = "purple", ...props }) => { const content = ( {iconLeft && {iconLeft}} {text} ); if (Platform.OS === "ios") { return ( {content} ); } return ( {iconLeft && {iconLeft}} {text} ); }; const styles = StyleSheet.create({ container: { overflow: "hidden", alignSelf: "flex-start", flexShrink: 1, flexGrow: 0, }, content: { flexDirection: "row", alignItems: "center", paddingHorizontal: 10, paddingVertical: 4, borderRadius: 50, backgroundColor: "transparent", }, iconLeft: { marginRight: 4, }, });