Open this example in the interactive library
Live preview
Source code
// components/LatitudeBandClassifier.tsx
export default function LatitudeBandClassifier({ lat = 43.65 }: { lat?: number } = {}) {
const a = Math.abs(lat);
return (
<p>{a <= 23.436 ? "Tropics" : a >= 66.564 ? "Polar circle" : "Temperate zone"}</p>
);
}
