From 6ee05338ad179cd46bfd2a70b17bacf00ac22cd8 Mon Sep 17 00:00:00 2001 From: THIS ONE IS A LITTLE BIT TRICKY KRUB Date: Thu, 13 Feb 2025 22:05:58 +0700 Subject: [PATCH] feat: add Radix UI components for select and switch, and create a reusable textarea component --- frontend/app/setup/planting-detail-form.tsx | 182 +++++++++++++++++++- frontend/components/ui/select.tsx | 159 +++++++++++++++++ frontend/components/ui/switch.tsx | 29 ++++ frontend/components/ui/textarea.tsx | 22 +++ frontend/package.json | 2 + frontend/pnpm-lock.yaml | 76 ++++++++ 6 files changed, 464 insertions(+), 6 deletions(-) create mode 100644 frontend/components/ui/select.tsx create mode 100644 frontend/components/ui/switch.tsx create mode 100644 frontend/components/ui/textarea.tsx diff --git a/frontend/app/setup/planting-detail-form.tsx b/frontend/app/setup/planting-detail-form.tsx index 13d8a08..d2e08f4 100644 --- a/frontend/app/setup/planting-detail-form.tsx +++ b/frontend/app/setup/planting-detail-form.tsx @@ -13,6 +13,15 @@ import { useForm } from "react-hook-form"; import { z } from "zod"; import { zodResolver } from "@hookform/resolvers/zod"; import { Input } from "@/components/ui/input"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Textarea } from "@/components/ui/textarea"; +import { Switch } from "@/components/ui/switch"; type plantingSchema = z.infer; @@ -23,7 +32,7 @@ export default function PlantingDetailsForm() { }); return (
- +
)} /> + ( + + Start Method + + + + + + )} + /> + ( + + Light Profile + + + + + + )} + /> + ( + + + Soil Conditions + + + + + + + )} + /> + ( + + + Planting Details + + +
+
+