From f7b05f1e08eb11ead8ce5a26e263ae22f77cd6da Mon Sep 17 00:00:00 2001 From: Tran Anh Tuan Date: Fri, 7 Nov 2025 15:28:55 +0700 Subject: [PATCH] tadd select component --- app/(tabs)/sensor.tsx | 22 +- app/auth/login.tsx | 7 +- components/ButtonCreateNewHaulOrTrip.tsx | 6 + components/Select.tsx | 272 ++++++++++++++++++ .../components/FishCardForm.tsx | 15 +- .../components/FishSelectDropdown.tsx | 17 +- state/use-fish.ts | 4 +- 7 files changed, 318 insertions(+), 25 deletions(-) create mode 100644 components/Select.tsx diff --git a/app/(tabs)/sensor.tsx b/app/(tabs)/sensor.tsx index d8efbe9..dcb363b 100644 --- a/app/(tabs)/sensor.tsx +++ b/app/(tabs)/sensor.tsx @@ -1,4 +1,5 @@ import ScanQRCode from "@/components/ScanQRCode"; +import Select from "@/components/Select"; import { useState } from "react"; import { Platform, @@ -21,13 +22,32 @@ export default function Sensor() { const handleScanPress = () => { setScanModalVisible(true); }; + const [selectedValue, setSelectedValue] = useState< + string | number | undefined + >(undefined); + + const options = [ + { label: "Apple", value: "apple" }, + { label: "Banana", value: "banana" }, + { label: "Cherry", value: "cherry", disabled: true }, + ]; return ( Cảm biến trên tàu - +