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 (
<Pressable
key={index}
style={[Styles.itemSelectModal]}
style={[Styles.itemSelectModal, { borderBottomColor: colors.icon + '20' }]}
onPress={() => {
!found && onChoose(item.idUser)
}}

View File

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

View File

@@ -1,4 +1,5 @@
import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { useState } from "react";
import { Image } from "react-native";
@@ -9,12 +10,16 @@ type Props = {
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 { colors } = useTheme()
return (
<Image
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={() => {
setError(true)
onError?.(true)