""import { useState } from 'react'; import { Card, CardContent } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Checkbox } from "@/components/ui/checkbox"; import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "@/components/ui/select"; const App = () => { const [area, setArea] = useState(''); const [vegetation, setVegetation] = useState(''); const [hasTrunks, setHasTrunks] = useState(false); const [hasStones, setHasStones] = useState(false); const [price, setPrice] = useState(null); const handleCalculate = () => { const basePrice = vegetation === 'grama' ? 2 : vegetation === 'mato_leve' ? 3 : 5; const trunkCost = hasTrunks ? 1 : 0; const stoneCost = hasStones ? 1 : 0; const total = (parseFloat(area) * (basePrice + trunkCost + stoneCost)).toFixed(2); setPrice(total); }; return (
setArea(e.target.value)} type="number" />
{price &&

Valor Estimado: R$ {price}

}
); }; export default App; ""

Comentários

Postagens mais visitadas deste blog

Frei Gilson - O Senhor nos Livra das Provocações