diff --git a/app/(application)/(user)/notifications/index.tsx b/app/(application)/(user)/notifications/index.tsx index c497443..1fe591f 100644 --- a/app/(application)/(user)/notifications/index.tsx +++ b/app/(application)/(user)/notifications/index.tsx @@ -1,9 +1,118 @@ -import { TextCustom, ViewWrapper } from "@/components"; +import { + BaseBox, + Grid, + ScrollableCustom, + StackCustom, + TextCustom, + ViewWrapper, +} from "@/components"; +import { MainColor } from "@/constants/color-palet"; +import { useState } from "react"; +import { View } from "react-native"; + +const categories = [ + { id: 1, label: "Semua" }, + { id: 2, label: "Event" }, + { id: 3, label: "Job" }, + { id: 4, label: "Voting" }, + { id: 5, label: "Donasi" }, + { id: 6, label: "Investasi" }, + { id: 7, label: "Forum" }, + { id: 8, label: "Collaboration" }, +]; + +const selectedCategory = (id: number) => { + const category = categories.find((c) => c.id === id); + return category?.label; +}; + +const BoxNotification = ({ + index, + activeCategory, +}: { + index: number; + activeCategory: number | null; +}) => { + return ( + <> + + console.log( + "Notification >", + selectedCategory(activeCategory as number) + ) + } + > + + + # {selectedCategory(activeCategory as number)} + + + + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Sint odio + unde quidem voluptate quam culpa sequi molestias ipsa corrupti id, + soluta, nostrum adipisci similique, et illo asperiores deleniti eum + labore. + + + + + + {index + 1} Agustus 2025 + + + + + Belum lihat + + + + + + + ); +}; export default function Notifications() { + const [activeCategory, setActiveCategory] = useState(1); + + const handlePress = (item: any) => { + setActiveCategory(item.id); + // tambahkan logika lain seperti filter dsb. + }; return ( - - Notifications + + } + > + {Array.from({ length: 20 }).map((e, i) => ( + + + + ))} + + {/* Konten utama di sini */} + {/* + + {activeCategory + ? `Kategori Aktif: ${ + categories.find((c) => c.id === activeCategory)?.label + }` + : "Pilih kategori"} + + */} ); } diff --git a/app/(application)/(user)/user-search/index.tsx b/app/(application)/(user)/user-search/index.tsx index 69f4006..99c9a2a 100644 --- a/app/(application)/(user)/user-search/index.tsx +++ b/app/(application)/(user)/user-search/index.tsx @@ -52,6 +52,7 @@ export default function UserSearch() { } placeholder="Cari Pengguna" borderRadius={50} + containerStyle={{ marginBottom: 0 }} /> } > diff --git a/components/Button/buttonCustomStyles.ts b/components/Button/buttonCustomStyles.ts index 3c19e6d..274475c 100644 --- a/components/Button/buttonCustomStyles.ts +++ b/components/Button/buttonCustomStyles.ts @@ -7,7 +7,7 @@ import { StyleSheet } from "react-native"; export const stylesButton = StyleSheet.create({ button: { backgroundColor: MainColor.yellow, - paddingVertical: 12, + paddingVertical: 10, paddingHorizontal: 20, flexDirection: "row", // 👈 Tambahkan baris ini alignItems: "center", diff --git a/components/Scroll/ScrollCustom.tsx b/components/Scroll/ScrollCustom.tsx new file mode 100644 index 0000000..2c82c6c --- /dev/null +++ b/components/Scroll/ScrollCustom.tsx @@ -0,0 +1,60 @@ +import { AccentColor, MainColor } from "@/constants/color-palet"; +import React from "react"; +import { ScrollView, StyleSheet } from "react-native"; +import ButtonCustom from "../Button/ButtonCustom"; + +interface ButtonData { + id: string | number; + label: string; +} + +interface ScrollableCustomProps { + data: ButtonData[]; + onButtonPress: (item: ButtonData) => void; + activeId?: string | number; +} + +const ScrollableCustom = ({ + data, + onButtonPress, + activeId, +}: ScrollableCustomProps) => { + return ( + + {data.map((item) => { + const isActive = activeId === item.id; + + return ( + onButtonPress(item)} + > + {item.label} + + ); + })} + + ); +}; + +export default ScrollableCustom; + +const styles = StyleSheet.create({ + scrollView: { + // maxHeight: 50, + }, + buttonContainer: { + flexDirection: "row", + alignItems: "center", + // paddingHorizontal: 16, + // paddingVertical: 10, + gap: 12, + }, +}); diff --git a/components/Text/TextCustom.tsx b/components/Text/TextCustom.tsx index 79a2703..2065ac6 100644 --- a/components/Text/TextCustom.tsx +++ b/components/Text/TextCustom.tsx @@ -22,7 +22,7 @@ interface TextCustomProps { bold?: boolean; semiBold?: boolean; size?: "default" | "large" | "small"; - color?: "default" | "yellow" | "red"; + color?: "default" | "yellow" | "red" | "gray"; align?: TextAlign; // Prop untuk alignment truncate?: boolean | number; onPress?: () => void; @@ -56,6 +56,7 @@ const TextCustom: React.FC = ({ // Color if (color === "yellow") selectedStyles.push(styles.yellow); else if (color === "red") selectedStyles.push(styles.red); + else if (color === "gray") selectedStyles.push(styles.gray); // Alignment if (align) { @@ -122,4 +123,7 @@ export const styles = StyleSheet.create({ red: { color: MainColor.red, }, + gray: { + color: MainColor.placeholder, + }, }); diff --git a/components/TextInput/TextInputCustom.tsx b/components/TextInput/TextInputCustom.tsx index 96fe3a2..3a0fca1 100644 --- a/components/TextInput/TextInputCustom.tsx +++ b/components/TextInput/TextInputCustom.tsx @@ -24,6 +24,7 @@ type Props = { borderRadius?: number; style?: StyleProp; maxLength?: number; + containerStyle?: StyleProp; } & Omit, "style">; const TextInputCustom = ({ @@ -40,6 +41,7 @@ const TextInputCustom = ({ keyboardType, onChangeText, maxLength, + containerStyle, ...rest }: Props) => { const [isPasswordVisible, setIsPasswordVisible] = useState(false); @@ -73,7 +75,7 @@ const TextInputCustom = ({ }; return ( - + {label && ( {label} diff --git a/components/index.ts b/components/index.ts index f2f2ed3..b10ccbf 100644 --- a/components/index.ts +++ b/components/index.ts @@ -37,6 +37,8 @@ import MapCustom from "./Map/MapCustom"; import CenterCustom from "./Center/CenterCustom"; // Clickable import ClickableCustom from "./Clickable/ClickableCustom"; +// Scroll +import ScrollableCustom from "./Scroll/ScrollCustom"; export { AlertCustom, @@ -78,4 +80,6 @@ export { CenterCustom, // Clickable ClickableCustom, + // Scroll + ScrollableCustom, }; diff --git a/constants/constans-value.ts b/constants/constans-value.ts index 04a9502..ae0f626 100644 --- a/constants/constans-value.ts +++ b/constants/constans-value.ts @@ -7,13 +7,31 @@ export { DRAWER_HEIGHT, RADIUS_BUTTON, ICON_SIZE_BUTTON, + PADDING_EXTRA_SMALL, + PADDING_SMALL, + PADDING_MEDIUM, + PADDING_LARGE, }; +// Text Size const TEXT_SIZE_SMALL = 12; const TEXT_SIZE_MEDIUM = 14; const TEXT_SIZE_LARGE = 16; + +// Icon Size +const ICON_SIZE_BUTTON = 18 const ICON_SIZE_SMALL = 20; const ICON_SIZE_MEDIUM = 24; + +// Drawer Height const DRAWER_HEIGHT = 500; // tinggi drawer5 + +// Radius Button const RADIUS_BUTTON = 50 -const ICON_SIZE_BUTTON = 18 \ No newline at end of file + +// Padding +const PADDING_EXTRA_SMALL = 10 +const PADDING_SMALL = 12 +const PADDING_MEDIUM = 16 +const PADDING_LARGE = 20 + diff --git a/screens/Portofolio/ListPage.tsx b/screens/Portofolio/ListPage.tsx index 4ad7416..b2253a7 100644 --- a/screens/Portofolio/ListPage.tsx +++ b/screens/Portofolio/ListPage.tsx @@ -1,35 +1,61 @@ import { IMenuDrawerItem } from "@/components/_Interface/types"; import { AccentColor } from "@/constants/color-palet"; import { ICON_SIZE_MEDIUM } from "@/constants/constans-value"; -import { Ionicons } from "@expo/vector-icons"; +import { Ionicons, FontAwesome5, FontAwesome, Fontisto } from "@expo/vector-icons"; -export const drawerItemsPortofolio = ({ - id, -}: { - id: string; -}): IMenuDrawerItem[] => [ +export const drawerItemsPortofolio = ({ id }: { id: string }): IMenuDrawerItem[] => [ { - icon: , + icon: ( + + ), label: "Edit portofolio", path: `/(application)/portofolio/${id}/edit`, }, { - icon: , + icon: ( + + ), label: "Edit logo ", path: `/(application)/portofolio/${id}/edit-logo`, }, { - icon: , + icon: ( + + ), label: "Edit social media ", path: `/(application)/portofolio/${id}/edit-social-media`, }, { - icon: , + icon: ( + + ), label: "Edit Map", path: `/(application)/maps/${id}/edit`, }, { - icon: , + icon: ( + + ), label: "Custom Pin Map", path: `/(application)/maps/${id}/custom-pin`, }, diff --git a/styles/global-styles.ts b/styles/global-styles.ts index 3e9f93a..b0b291b 100644 --- a/styles/global-styles.ts +++ b/styles/global-styles.ts @@ -1,4 +1,8 @@ import { + PADDING_EXTRA_SMALL, + PADDING_LARGE, + PADDING_MEDIUM, + PADDING_SMALL, TEXT_SIZE_LARGE, TEXT_SIZE_MEDIUM, TEXT_SIZE_SMALL, @@ -12,28 +16,28 @@ export const GStyles = StyleSheet.create({ // =============== Main Styles =============== // container: { flex: 1, - paddingInline: 20, - paddingBlock: 10, + paddingInline: PADDING_LARGE, + paddingBlock: PADDING_EXTRA_SMALL, backgroundColor: MainColor.darkblue, }, containerWithBackground: { flex: 1, - paddingInline: 20, - paddingBlock: 10, + paddingInline: PADDING_LARGE, + paddingBlock: PADDING_EXTRA_SMALL, }, imageBackground: { height: "100%", width: "100%", }, stickyHeader: { - position: "absolute", + position: "relative", top: 0, left: 0, right: 0, zIndex: 10, - backgroundColor: MainColor.darkblue, - paddingTop: 16, - paddingInline: 16, + backgroundColor: "transparent", + paddingBlock: PADDING_SMALL, + paddingInline: PADDING_MEDIUM, // padding: 16, // paddingTop: 8, // paddingBottom: 8,