2025-06-15 21:06:10 +00:00
|
|
|
import { Button } from "./ui/button";
|
|
|
|
|
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog";
|
|
|
|
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";
|
2025-06-14 15:36:38 +00:00
|
|
|
|
2025-06-15 12:48:52 +00:00
|
|
|
export function Parameters(
|
|
|
|
|
props: {
|
2025-06-15 21:06:10 +00:00
|
|
|
isOpen: boolean,
|
|
|
|
|
onSubmit: () => void,
|
2025-06-15 12:48:52 +00:00
|
|
|
}
|
|
|
|
|
) {
|
2025-06-14 15:36:38 +00:00
|
|
|
return <>
|
2025-06-15 21:06:10 +00:00
|
|
|
{/* <Dialog open={props.isOpen}> */}
|
|
|
|
|
<Dialog >
|
|
|
|
|
<form>
|
|
|
|
|
<DialogTrigger asChild>
|
|
|
|
|
<Button variant="outline">Open Parameters</Button>
|
|
|
|
|
</DialogTrigger>
|
|
|
|
|
<DialogContent className="sm:max-w-[425px]">
|
|
|
|
|
<DialogHeader>
|
|
|
|
|
<DialogTitle>Parameters</DialogTitle>
|
|
|
|
|
</DialogHeader>
|
|
|
|
|
<Select>
|
|
|
|
|
<SelectTrigger className="w-[180px]">
|
|
|
|
|
<SelectValue placeholder="Metric to Visualize" />
|
|
|
|
|
</SelectTrigger>
|
|
|
|
|
<SelectContent>
|
|
|
|
|
<SelectItem value="qmprice">Price per squaremeter</SelectItem>
|
|
|
|
|
<SelectItem value="rooms">Number of rooms</SelectItem>
|
|
|
|
|
<SelectItem value="qm">Area</SelectItem>
|
|
|
|
|
<SelectItem value="total_price">Price</SelectItem>
|
|
|
|
|
</SelectContent>
|
|
|
|
|
</Select>
|
|
|
|
|
<DialogFooter>
|
|
|
|
|
<Button onClick={() => props.onSubmit()}>Fetch Data</Button>
|
|
|
|
|
</DialogFooter>
|
|
|
|
|
</DialogContent>
|
|
|
|
|
</form>
|
|
|
|
|
</Dialog>
|
2025-06-14 15:36:38 +00:00
|
|
|
</>
|
|
|
|
|
}
|
|
|
|
|
|