Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920import { Text } from "react-native";import { weatherCodeToEmoji } from "@/lib/weather";
interface WeatherIconProps { code: number; temperature: number; size?: "sm" | "lg";}
export function WeatherIcon({ code, temperature, size = "sm" }: WeatherIconProps) { const emoji = weatherCodeToEmoji(code); const textSize = size === "lg" ? "text-lg" : "text-xs";
return ( <Text className={`${textSize} text-white`}> {emoji} {Math.round(temperature)}° </Text> );}