From 9667065bb3ce7f844440b519788482092cde99dc Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Wed, 2 Jul 2025 12:20:42 +0800 Subject: [PATCH] fix folder component --- app/(application)/portofolio/[id]/index.tsx | 2 +- app/(application)/portofolio/_layout.tsx | 2 +- app/(application)/profile/[id]/index.tsx | 3 ++- .../BackButton.tsx | 0 components/Button/ButtonCustom.tsx | 2 +- ...{buttonStyles.ts => buttonCustomStyles.ts} | 0 components/index.ts | 27 +++++++++++++------ screens/Profile/menuDrawerSection.tsx | 7 +++-- styles/global-styles.ts | 7 ++--- 9 files changed, 33 insertions(+), 17 deletions(-) rename components/{_ShareComponent => Button}/BackButton.tsx (100%) rename components/Button/{buttonStyles.ts => buttonCustomStyles.ts} (100%) diff --git a/app/(application)/portofolio/[id]/index.tsx b/app/(application)/portofolio/[id]/index.tsx index adbe835..b3a52a8 100644 --- a/app/(application)/portofolio/[id]/index.tsx +++ b/app/(application)/portofolio/[id]/index.tsx @@ -1,4 +1,4 @@ -import BackButton from "@/components/_ShareComponent/BackButton"; +import BackButton from "@/components/Button/BackButton"; import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; import { Styles } from "@/styles/global-styles"; import { Stack, useLocalSearchParams } from "expo-router"; diff --git a/app/(application)/portofolio/_layout.tsx b/app/(application)/portofolio/_layout.tsx index 1d82e97..ef2a78a 100644 --- a/app/(application)/portofolio/_layout.tsx +++ b/app/(application)/portofolio/_layout.tsx @@ -1,5 +1,5 @@ -import BackButton from "@/components/_ShareComponent/BackButton"; +import BackButton from "@/components/Button/BackButton"; import { Styles } from "@/styles/global-styles"; import { Stack } from "expo-router"; diff --git a/app/(application)/profile/[id]/index.tsx b/app/(application)/profile/[id]/index.tsx index e68051b..483d014 100644 --- a/app/(application)/profile/[id]/index.tsx +++ b/app/(application)/profile/[id]/index.tsx @@ -1,7 +1,7 @@ import { IMenuDrawerItem } from "@/components/_Interface/types"; -import BackButton from "@/components/_ShareComponent/BackButton"; import ViewWrapper from "@/components/_ShareComponent/ViewWrapper"; import AlertCustom from "@/components/Alert/AlertCustom"; +import BackButton from "@/components/Button/BackButton"; import DrawerCustom from "@/components/Drawer/DrawerCustom"; import { MainColor } from "@/constants/color-palet"; import { DRAWER_HEIGHT } from "@/constants/constans-value"; @@ -124,6 +124,7 @@ export default function Profile() { diff --git a/components/_ShareComponent/BackButton.tsx b/components/Button/BackButton.tsx similarity index 100% rename from components/_ShareComponent/BackButton.tsx rename to components/Button/BackButton.tsx diff --git a/components/Button/ButtonCustom.tsx b/components/Button/ButtonCustom.tsx index 9dedd2e..fc36720 100644 --- a/components/Button/ButtonCustom.tsx +++ b/components/Button/ButtonCustom.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Text, TouchableOpacity } from "react-native"; -import buttonStyles from "./buttonStyles"; +import buttonStyles from "./buttonCustomStyles"; // Definisi props dengan TypeScript diff --git a/components/Button/buttonStyles.ts b/components/Button/buttonCustomStyles.ts similarity index 100% rename from components/Button/buttonStyles.ts rename to components/Button/buttonCustomStyles.ts diff --git a/components/index.ts b/components/index.ts index 55331a9..aeb2044 100644 --- a/components/index.ts +++ b/components/index.ts @@ -1,19 +1,30 @@ -import { TextInputCustom } from "./TextInput/TextInputCustom"; -import ButtonCustom from "./Button/ButtonCustom"; +// Alert import AlertCustom from "./Alert/AlertCustom"; +// Button +import BackButton from "./Button/BackButton"; +import ButtonCustom from "./Button/ButtonCustom"; +// Drawer import DrawerCustom from "./Drawer/DrawerCustom"; +import MenuDrawerDynamicGrid from "./Drawer/MenuDrawerDynamicGird"; +// ShareComponent import ViewWrapper from "./_ShareComponent/ViewWrapper"; -import BackButton from "./_ShareComponent/BackButton"; -import Spacing from "./_ShareComponent/Spacing"; import TruncatedText from "./_ShareComponent/TruncatedText"; +import Spacing from "./_ShareComponent/Spacing"; +// TextInput +import { TextInputCustom } from "./TextInput/TextInputCustom"; export { - TextInputCustom, - ButtonCustom, AlertCustom, - DrawerCustom, - ViewWrapper, + // Button BackButton, + ButtonCustom, + // Drawer + DrawerCustom, + MenuDrawerDynamicGrid, + // ShareComponent Spacing, TruncatedText, + ViewWrapper, + // TextInput + TextInputCustom, }; diff --git a/screens/Profile/menuDrawerSection.tsx b/screens/Profile/menuDrawerSection.tsx index d9095ae..b9a574d 100644 --- a/screens/Profile/menuDrawerSection.tsx +++ b/screens/Profile/menuDrawerSection.tsx @@ -5,18 +5,21 @@ import { router } from "expo-router"; export default function Profile_MenuDrawerSection({ drawerItems, setShowLogoutAlert, + setIsDrawerOpen, }: { drawerItems: IMenuDrawerItem[]; setShowLogoutAlert: (value: boolean) => void; + setIsDrawerOpen: (value: boolean) => void; }) { const handlePress = (item: IMenuDrawerItem) => { if (item.label === "Keluar") { - // console.log("Logout clicked"); + // console.log("Logout clicked"); setShowLogoutAlert(true); } else { - console.log("PATH >> ",item.path); + console.log("PATH >> ", item.path); router.push(item.path as any); } + setIsDrawerOpen(false); }; return ( diff --git a/styles/global-styles.ts b/styles/global-styles.ts index a92a8bf..8940212 100644 --- a/styles/global-styles.ts +++ b/styles/global-styles.ts @@ -1,18 +1,19 @@ import { Dimensions, StyleSheet } from "react-native"; import { AccentColor, MainColor } from "../constants/color-palet"; +import { TEXT_SIZE_MEDIUM } from "@/constants/constans-value"; const { width } = Dimensions.get("window"); export const Styles = StyleSheet.create({ container: { flex: 1, - paddingInline: 25, + paddingInline: 20, paddingBlock: 10, backgroundColor: MainColor.darkblue, }, containerWithBackground: { flex: 1, - paddingInline: 25, + paddingInline: 20, paddingBlock: 10, }, imageBackground: { @@ -42,7 +43,7 @@ export const Styles = StyleSheet.create({ // TEXT & LABEL textLabel: { - fontSize: 14, + fontSize: TEXT_SIZE_MEDIUM, color: MainColor.white, fontWeight: "normal", },