fix folder component
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import BackButton from "@/components/_ShareComponent/BackButton";
|
import BackButton from "@/components/Button/BackButton";
|
||||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
import { Styles } from "@/styles/global-styles";
|
import { Styles } from "@/styles/global-styles";
|
||||||
import { Stack, useLocalSearchParams } from "expo-router";
|
import { Stack, useLocalSearchParams } from "expo-router";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import BackButton from "@/components/_ShareComponent/BackButton";
|
import BackButton from "@/components/Button/BackButton";
|
||||||
import { Styles } from "@/styles/global-styles";
|
import { Styles } from "@/styles/global-styles";
|
||||||
import { Stack } from "expo-router";
|
import { Stack } from "expo-router";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
import { IMenuDrawerItem } from "@/components/_Interface/types";
|
||||||
import BackButton from "@/components/_ShareComponent/BackButton";
|
|
||||||
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
|
||||||
import AlertCustom from "@/components/Alert/AlertCustom";
|
import AlertCustom from "@/components/Alert/AlertCustom";
|
||||||
|
import BackButton from "@/components/Button/BackButton";
|
||||||
import DrawerCustom from "@/components/Drawer/DrawerCustom";
|
import DrawerCustom from "@/components/Drawer/DrawerCustom";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { DRAWER_HEIGHT } from "@/constants/constans-value";
|
import { DRAWER_HEIGHT } from "@/constants/constans-value";
|
||||||
@@ -124,6 +124,7 @@ export default function Profile() {
|
|||||||
<Profile_MenuDrawerSection
|
<Profile_MenuDrawerSection
|
||||||
drawerItems={drawerItems}
|
drawerItems={drawerItems}
|
||||||
setShowLogoutAlert={setShowLogoutAlert}
|
setShowLogoutAlert={setShowLogoutAlert}
|
||||||
|
setIsDrawerOpen={setIsDrawerOpen}
|
||||||
/>
|
/>
|
||||||
</DrawerCustom>
|
</DrawerCustom>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Text, TouchableOpacity } from "react-native";
|
import { Text, TouchableOpacity } from "react-native";
|
||||||
import buttonStyles from "./buttonStyles";
|
import buttonStyles from "./buttonCustomStyles";
|
||||||
|
|
||||||
// Definisi props dengan TypeScript
|
// Definisi props dengan TypeScript
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,30 @@
|
|||||||
import { TextInputCustom } from "./TextInput/TextInputCustom";
|
// Alert
|
||||||
import ButtonCustom from "./Button/ButtonCustom";
|
|
||||||
import AlertCustom from "./Alert/AlertCustom";
|
import AlertCustom from "./Alert/AlertCustom";
|
||||||
|
// Button
|
||||||
|
import BackButton from "./Button/BackButton";
|
||||||
|
import ButtonCustom from "./Button/ButtonCustom";
|
||||||
|
// Drawer
|
||||||
import DrawerCustom from "./Drawer/DrawerCustom";
|
import DrawerCustom from "./Drawer/DrawerCustom";
|
||||||
|
import MenuDrawerDynamicGrid from "./Drawer/MenuDrawerDynamicGird";
|
||||||
|
// ShareComponent
|
||||||
import ViewWrapper from "./_ShareComponent/ViewWrapper";
|
import ViewWrapper from "./_ShareComponent/ViewWrapper";
|
||||||
import BackButton from "./_ShareComponent/BackButton";
|
|
||||||
import Spacing from "./_ShareComponent/Spacing";
|
|
||||||
import TruncatedText from "./_ShareComponent/TruncatedText";
|
import TruncatedText from "./_ShareComponent/TruncatedText";
|
||||||
|
import Spacing from "./_ShareComponent/Spacing";
|
||||||
|
// TextInput
|
||||||
|
import { TextInputCustom } from "./TextInput/TextInputCustom";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
TextInputCustom,
|
|
||||||
ButtonCustom,
|
|
||||||
AlertCustom,
|
AlertCustom,
|
||||||
DrawerCustom,
|
// Button
|
||||||
ViewWrapper,
|
|
||||||
BackButton,
|
BackButton,
|
||||||
|
ButtonCustom,
|
||||||
|
// Drawer
|
||||||
|
DrawerCustom,
|
||||||
|
MenuDrawerDynamicGrid,
|
||||||
|
// ShareComponent
|
||||||
Spacing,
|
Spacing,
|
||||||
TruncatedText,
|
TruncatedText,
|
||||||
|
ViewWrapper,
|
||||||
|
// TextInput
|
||||||
|
TextInputCustom,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,18 +5,21 @@ import { router } from "expo-router";
|
|||||||
export default function Profile_MenuDrawerSection({
|
export default function Profile_MenuDrawerSection({
|
||||||
drawerItems,
|
drawerItems,
|
||||||
setShowLogoutAlert,
|
setShowLogoutAlert,
|
||||||
|
setIsDrawerOpen,
|
||||||
}: {
|
}: {
|
||||||
drawerItems: IMenuDrawerItem[];
|
drawerItems: IMenuDrawerItem[];
|
||||||
setShowLogoutAlert: (value: boolean) => void;
|
setShowLogoutAlert: (value: boolean) => void;
|
||||||
|
setIsDrawerOpen: (value: boolean) => void;
|
||||||
}) {
|
}) {
|
||||||
const handlePress = (item: IMenuDrawerItem) => {
|
const handlePress = (item: IMenuDrawerItem) => {
|
||||||
if (item.label === "Keluar") {
|
if (item.label === "Keluar") {
|
||||||
// console.log("Logout clicked");
|
// console.log("Logout clicked");
|
||||||
setShowLogoutAlert(true);
|
setShowLogoutAlert(true);
|
||||||
} else {
|
} else {
|
||||||
console.log("PATH >> ",item.path);
|
console.log("PATH >> ", item.path);
|
||||||
router.push(item.path as any);
|
router.push(item.path as any);
|
||||||
}
|
}
|
||||||
|
setIsDrawerOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
import { Dimensions, StyleSheet } from "react-native";
|
import { Dimensions, StyleSheet } from "react-native";
|
||||||
import { AccentColor, MainColor } from "../constants/color-palet";
|
import { AccentColor, MainColor } from "../constants/color-palet";
|
||||||
|
import { TEXT_SIZE_MEDIUM } from "@/constants/constans-value";
|
||||||
|
|
||||||
const { width } = Dimensions.get("window");
|
const { width } = Dimensions.get("window");
|
||||||
|
|
||||||
export const Styles = StyleSheet.create({
|
export const Styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
paddingInline: 25,
|
paddingInline: 20,
|
||||||
paddingBlock: 10,
|
paddingBlock: 10,
|
||||||
backgroundColor: MainColor.darkblue,
|
backgroundColor: MainColor.darkblue,
|
||||||
},
|
},
|
||||||
containerWithBackground: {
|
containerWithBackground: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
paddingInline: 25,
|
paddingInline: 20,
|
||||||
paddingBlock: 10,
|
paddingBlock: 10,
|
||||||
},
|
},
|
||||||
imageBackground: {
|
imageBackground: {
|
||||||
@@ -42,7 +43,7 @@ export const Styles = StyleSheet.create({
|
|||||||
|
|
||||||
// TEXT & LABEL
|
// TEXT & LABEL
|
||||||
textLabel: {
|
textLabel: {
|
||||||
fontSize: 14,
|
fontSize: TEXT_SIZE_MEDIUM,
|
||||||
color: MainColor.white,
|
color: MainColor.white,
|
||||||
fontWeight: "normal",
|
fontWeight: "normal",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user