fix: sesuaikan warna border dengan tema pada halaman pilih anggota dan admin divisi

This commit is contained in:
2026-05-19 12:06:12 +08:00
parent fcd3dc7537
commit 2bacc47d75
3 changed files with 9 additions and 4 deletions

View File

@@ -117,7 +117,7 @@ export default function CreateDivisionAddAdmin() {
return ( return (
<Pressable <Pressable
key={index} key={index}
style={[Styles.itemSelectModal]} style={[Styles.itemSelectModal, { borderBottomColor: colors.icon + '20' }]}
onPress={() => { onPress={() => {
!found && onChoose(item.idUser) !found && onChoose(item.idUser)
}} }}

View File

@@ -121,7 +121,7 @@ export default function CreateDivisionAddMember() {
return ( return (
<Pressable <Pressable
key={index} key={index}
style={[Styles.itemSelectModal]} style={[Styles.itemSelectModal, { borderBottomColor: colors.icon + '20' }]}
onPress={() => { onPress={() => {
!found && onChoose(item.id, item.name, item.img) !found && onChoose(item.id, item.name, item.img)
}} }}

View File

@@ -1,4 +1,5 @@
import Styles from "@/constants/Styles"; import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { useState } from "react"; import { useState } from "react";
import { Image } from "react-native"; import { Image } from "react-native";
@@ -9,12 +10,16 @@ type Props = {
onError?: (val:boolean) => void onError?: (val:boolean) => void
} }
export default function ImageUser({ src, size, onError }: Props) { export default function ImageUser({ src, size, border, onError }: Props) {
const [error, setError] = useState(false) const [error, setError] = useState(false)
const { colors } = useTheme()
return ( return (
<Image <Image
source={error ? require('../assets/images/user.jpg') : { uri: src }} source={error ? require('../assets/images/user.jpg') : { uri: src }}
style={[size == 'xs' ? Styles.userProfileExtraSmall : size == 'lg' ? Styles.userProfileBig : Styles.userProfileSmall, Styles.borderAll]} style={[
size == 'xs' ? Styles.userProfileExtraSmall : size == 'lg' ? Styles.userProfileBig : Styles.userProfileSmall,
border && { borderWidth: 1, borderColor: colors.icon + '40', borderRadius: 100 }
]}
onError={() => { onError={() => {
setError(true) setError(true)
onError?.(true) onError?.(true)