import { Cloud, Droplets, Gauge, ThermometerSun, Wind } from "lucide-react"; interface WeatherDetailsGridProps { icon: React.ReactNode; label: string; value: string; subtitle?: string; } function WeatherInfoItem({ icon, label, value, subtitle }: WeatherDetailsGridProps) { return(
{icon}

{label}

{value}

{subtitle &&

{subtitle}

}
) } export function WeatherDetailsGrid(){ const currentWeather = useWeatherState(); if(!currentWeather) return null; return(
} label="湿度" value={`${currentWeather.current.humidity}%`} /> } label="风速" value={`${currentWeather.current.wind_speed} m/s`} /> } label="气压" value={`${currentWeather.current.pressure} hPa`} /> } label="云量" value={`${currentWeather.current.cloudcover}%`} /> } label="紫外线" value={`${currentWeather.current.uv_index} UV`} />
降水量:\ {currentWeather.current.precipitation} mm
{currentWeather.current.is_day === "yes" ? "白天" : "夜晚"}

观测时间: {currentWeather.current.observation_time}

) }