From 04f7bda40f025768c829a475271ec4b608632e23 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Wed, 15 Oct 2025 15:41:42 +0800 Subject: [PATCH] upd: tombol style Deskripsi: - bgcolor saat long press No Issues --- components/borderBottomItem.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/borderBottomItem.tsx b/components/borderBottomItem.tsx index 509b116..8a9b3fb 100644 --- a/components/borderBottomItem.tsx +++ b/components/borderBottomItem.tsx @@ -1,6 +1,6 @@ import { ColorsStatus } from "@/constants/ColorsStatus"; import Styles from "@/constants/Styles"; -import React from "react"; +import React, { useState } from "react"; import { Dimensions, Pressable, View } from "react-native"; import Text from "./Text"; @@ -27,9 +27,13 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, const lebarDim = Dimensions.get("window").width; const lebar = width ? lebarDim * width / 100 : 'auto'; const textColorFix = textColor ? textColor : 'black'; + const [isTap, setIsTap] = useState(false); + return ( setIsTap(true)} + onPressOut={() => setIsTap(false)} style={({ pressed }) => [ borderType == 'bottom' ? Styles.wrapItemBorderBottom @@ -38,7 +42,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, : Styles.wrapItemBorderNone, bgColor && bgColor == 'white' && ColorsStatus.white, // efek warna saat ditekan (sementara) - pressed && colorPress && ColorsStatus.pressedGray, + isTap && colorPress && ColorsStatus.pressedGray, ]} >