upd: text warna hitam

This commit is contained in:
2025-07-28 10:15:27 +08:00
parent 6cb6d22fc0
commit ec1eda54d7
49 changed files with 123 additions and 53 deletions

23
components/Text.tsx Normal file
View File

@@ -0,0 +1,23 @@
import React from 'react';
import { Text as RNText, TextProps as RNTextProps, StyleSheet } from 'react-native';
type TextProps = RNTextProps & {
children: React.ReactNode;
};
const Text: React.FC<TextProps> = ({ style, ...props }) => {
return (
<RNText
style={[styles.defaultText, style]}
{...props}
/>
);
};
const styles = StyleSheet.create({
defaultText: {
color: 'black',
},
});
export default Text;

View File

@@ -1,7 +1,8 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import React from "react";
import { Dimensions, Pressable, Text, View } from "react-native";
import { Dimensions, Pressable, View } from "react-native";
import Text from "./Text";
type Props = {
title?: string
@@ -23,6 +24,7 @@ type Props = {
export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor }: Props) {
const lebarDim = Dimensions.get("window").width;
const lebar = width ? lebarDim * width / 100 : 'auto';
const textColorFix = textColor ? textColor : 'black';
return (
<Pressable style={[borderType == 'bottom' ? Styles.wrapItemBorderBottom : borderType == 'all' ? Styles.wrapItemBorderAll : Styles.wrapItemBorderNone, bgColor && bgColor == 'white' && ColorsStatus.white]} onPress={onPress}>
@@ -30,23 +32,23 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress,
{icon}
<View style={[Styles.rowSpaceBetween, width ? { width: lebar } : { width: '88%' }]}>
<View style={[Styles.ml10, rightTopInfo ? { width: lebar } : { width: '90%' },]}>
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold, { color: textColor }]} numberOfLines={1} ellipsizeMode='tail'>{title}</Text>
<Text style={[titleWeight == 'normal' ? Styles.textDefault : Styles.textDefaultSemiBold]} numberOfLines={1} ellipsizeMode='tail'>{title}</Text>
{
subtitle &&
typeof subtitle == "string"
? <Text style={[Styles.textMediumNormal, { lineHeight: 15, color: textColor }]}>{subtitle}</Text>
? <Text style={[Styles.textMediumNormal, { lineHeight: 15, color: textColorFix }]}>{subtitle}</Text>
: <View style={{ alignItems: 'flex-start' }}>
{subtitle}
</View>
}
</View>
{
rightTopInfo && <Text style={[Styles.textInformation, Styles.mt05, { color: textColor }]}>{rightTopInfo}</Text>
rightTopInfo && <Text style={[Styles.textInformation, Styles.mt05, { color: textColorFix }]}>{rightTopInfo}</Text>
}
</View>
</View>
{desc && <Text style={[Styles.textDefault, Styles.mt05, { textAlign: 'justify', color: textColor }]} numberOfLines={descEllipsize == false ? 0 : 2} ellipsizeMode='tail'>{desc}</Text>}
{desc && <Text style={[Styles.textDefault, Styles.mt05, { textAlign: 'justify', color: textColorFix }]} numberOfLines={descEllipsize == false ? 0 : 2} ellipsizeMode='tail'>{desc}</Text>}
{
(leftBottomInfo || rightBottomInfo) &&
(

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import React from "react";
import { Text, TouchableWithoutFeedback, View } from "react-native";
import { TouchableWithoutFeedback, View } from "react-native";
import Text from "./Text";
type Props = {
onPress?: () => void;

View File

@@ -1,6 +1,7 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { Text, TouchableOpacity } from "react-native";
import { TouchableOpacity } from "react-native";
import Text from './Text';
type Props = {
text: string;

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Feather } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "./Text";
type Props = {
value: string

View File

@@ -1,6 +1,7 @@
import { ColorsStatus } from "@/constants/ColorsStatus"
import Styles from "@/constants/Styles"
import { Text, TouchableOpacity } from "react-native"
import { TouchableOpacity } from "react-native"
import Text from "./Text";
type Props = {
active: string

View File

@@ -3,7 +3,8 @@ import Styles from '@/constants/Styles';
import { AntDesign, Feather, Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import { TabTriggerSlotProps } from 'expo-router/ui';
import { ComponentProps, Ref } from 'react';
import { Pressable, Text, View } from 'react-native';
import { Pressable, View } from 'react-native';
import Text from './Text';
type Feather = ComponentProps<typeof Feather>['name'];
type Ionicons = ComponentProps<typeof Ionicons>['name'];

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Feather, Ionicons } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "./Text";
type Props = {
title: string

View File

@@ -3,7 +3,8 @@ import { apiGetDivisionOneFeature } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { router, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { Text, View } from "react-native";
import { View } from "react-native";
import Text from "../Text";
import DiscussionItem from "../discussionItem";
import Skeleton from "../skeleton";

View File

@@ -7,7 +7,8 @@ import { startActivityAsync } from 'expo-intent-launcher';
import { useLocalSearchParams } from "expo-router";
import * as Sharing from 'expo-sharing';
import React, { useEffect, useState } from "react";
import { Alert, Dimensions, Platform, Pressable, Text, View } from "react-native";
import { Alert, Dimensions, Platform, Pressable, View } from "react-native";
import Text from "../Text";
import * as mime from 'react-native-mime-types';
import { ICarouselInstance } from "react-native-reanimated-carousel";
import Skeleton from "../skeleton";

View File

@@ -5,8 +5,9 @@ import { useAuthSession } from "@/providers/AuthProvider"
import { AntDesign, MaterialIcons, SimpleLineIcons } from "@expo/vector-icons"
import { router, useLocalSearchParams } from "expo-router"
import { useEffect, useState } from "react"
import { Text, View } from "react-native"
import { View } from "react-native"
import BorderBottomItem from "../borderBottomItem"
import Text from "../Text"
type Props = {
tugas: number

View File

@@ -4,7 +4,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
import { Feather } from "@expo/vector-icons";
import { useLocalSearchParams } from "expo-router";
import React, { useEffect, useState } from "react";
import { Dimensions, Text, View } from "react-native";
import { Dimensions, View } from "react-native";
import Text from "../Text";
import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";
import Skeleton from "../skeleton";

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "../Text";
type Props = {

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { MaterialIcons } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "./Text";
import Modal from 'react-native-modal';
type Props = {

View File

@@ -1,5 +1,6 @@
import Styles from "@/constants/Styles"
import { Pressable, Text, View } from "react-native"
import { Pressable, View } from "react-native"
import Text from "./Text";
type Props = {
category: 'purple' | 'orange'

View File

@@ -2,9 +2,10 @@ import Styles from "@/constants/Styles";
import { apiGetDataHome } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { useEffect, useState } from "react";
import { Dimensions, Text, View } from "react-native";
import { Dimensions, View } from "react-native";
import { BarChart } from "react-native-gifted-charts";
import Skeleton from "../skeleton";
import Text from "../Text";
type Props = {
value: number;

View File

@@ -2,9 +2,10 @@ import Styles from "@/constants/Styles";
import { apiGetDataHome } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { useEffect, useState } from "react";
import { Text, View } from "react-native";
import { View } from "react-native";
import { PieChart } from "react-native-gifted-charts";
import Skeleton from "../skeleton";
import Text from "../Text";
type Props = {
value: number;

View File

@@ -3,9 +3,10 @@ import { apiGetDataHome } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { router } from "expo-router";
import { useEffect, useState } from "react";
import { Text, View } from "react-native";
import { View } from "react-native";
import DiscussionItem from "../discussionItem";
import Skeleton from "../skeleton";
import Text from "../Text";
type Props = {
id: string

View File

@@ -4,9 +4,10 @@ import { useAuthSession } from "@/providers/AuthProvider";
import { Feather } from "@expo/vector-icons";
import { router } from "expo-router";
import React, { useEffect, useState } from "react";
import { Dimensions, Pressable, Text, View } from "react-native";
import { Dimensions, Pressable, View } from "react-native";
import { ICarouselInstance } from "react-native-reanimated-carousel";
import Skeleton from "../skeleton";
import Text from "../Text";
type Props = {
id: string

View File

@@ -3,9 +3,10 @@ import { apiGetDataHome } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { router } from "expo-router";
import { useEffect, useState } from "react";
import { Text, View } from "react-native";
import { View } from "react-native";
import EventItem from "../eventItem";
import Skeleton from "../skeleton";
import Text from "../Text";
type Props = {
id: string

View File

@@ -1,9 +1,10 @@
import Styles from "@/constants/Styles"
import { AntDesign, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
import React from "react"
import { Text, View } from "react-native"
import { View } from "react-native"
import { ButtonFiturMenu } from "../buttonFiturMenu"
import { router } from "expo-router"
import Text from "../Text"
export default function FiturHome() {
return (

View File

@@ -3,12 +3,13 @@ import { apiGetDataHome } from "@/lib/api";
import { useAuthSession } from "@/providers/AuthProvider";
import { router } from "expo-router";
import React, { useEffect, useState } from "react";
import { Dimensions, Text, View } from "react-native";
import { Dimensions, View } from "react-native";
import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel";
import LabelStatus from "../labelStatus";
import PaperGridContent from "../paperGridContent";
import ProgressBar from "../progressBar";
import Skeleton from "../skeleton";
import Text from "../Text";
type Props = {
id: string

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Text, TouchableOpacity } from "react-native";
import { TouchableOpacity } from "react-native";
import ImageUser from "./imageNew";
import Text from "./Text";
type Props = {
src: string

View File

@@ -1,5 +1,6 @@
import Styles from "@/constants/Styles";
import { Dimensions, Text, TextInput, View } from "react-native";
import { Dimensions, TextInput, View } from "react-native";
import Text from "./Text";
type Props = {
label?: string;

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { AntDesign, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";
import { Text, View } from "react-native";
import { View } from "react-native";
import Text from "./Text";
type Props = {
category: 'nik' | 'group' | 'position' | 'phone' | 'email' | 'gender' | 'dokumen' | 'type' | 'location' | 'owner' | 'calendar' | 'share'

View File

@@ -1,7 +1,7 @@
import Styles from "@/constants/Styles";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "./Text";
type Props = {
done?: boolean

View File

@@ -1,7 +1,7 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { Text, View } from "react-native";
import { View } from "react-native";
import Text from "./Text";
type Props = {
category: 'error' | 'success' | 'warning' | 'primary' | 'secondary'

View File

@@ -1,5 +1,6 @@
import Styles from "@/constants/Styles"
import { Pressable, Text, View } from "react-native"
import { Pressable, View } from "react-native"
import Text from "./Text";
type Props = {
onPress: () => void

View File

@@ -5,7 +5,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
import { AntDesign } from "@expo/vector-icons"
import { router } from "expo-router"
import { useEffect, useState } from "react"
import { Pressable, ScrollView, Text, View } from "react-native"
import { Pressable, ScrollView, View } from "react-native"
import Text from './Text';
import { useDispatch, useSelector } from "react-redux"
import { ButtonForm } from "./buttonForm"
import DrawerBottom from "./drawerBottom"

View File

@@ -1,5 +1,6 @@
import Styles from '@/constants/Styles';
import { Pressable, Text, View } from 'react-native';
import { Pressable, View } from 'react-native';
import Text from './Text';
import Modal from 'react-native-modal';
type Props = {

View File

@@ -8,7 +8,8 @@ import { setMemberChoose } from "@/lib/memberChoose"
import { useAuthSession } from "@/providers/AuthProvider"
import { AntDesign } from "@expo/vector-icons"
import { useEffect, useState } from "react"
import { Pressable, ScrollView, Text, View } from "react-native"
import { Pressable, ScrollView, View } from "react-native"
import Text from "./Text";
import { useDispatch, useSelector } from "react-redux"
import { ButtonForm } from "./buttonForm"
import DrawerBottom from "./drawerBottom"

View File

@@ -3,7 +3,8 @@ import { apiGetDivisionGroup, apiGetDocumentInformasi, apiGetListDivisionByIdDiv
import { useAuthSession } from "@/providers/AuthProvider"
import { AntDesign } from "@expo/vector-icons"
import { useEffect, useState } from "react"
import { Pressable, ScrollView, Text, ToastAndroid, View } from "react-native"
import { Pressable, ScrollView, ToastAndroid, View } from "react-native"
import Text from "./Text";
import { ButtonForm } from "./buttonForm"
import DrawerBottom from "./drawerBottom"

View File

@@ -1,6 +1,7 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "./Text";
type Props = {
content: 'carousel' | 'page';

View File

@@ -1,7 +1,8 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { AntDesign } from "@expo/vector-icons";
import { Text, View } from "react-native";
import Text from "./Text";
import { View } from "react-native";
type Props = {
text?: string,

View File

@@ -1,7 +1,8 @@
import { ColorsStatus } from "@/constants/ColorsStatus";
import Styles from "@/constants/Styles";
import { AntDesign } from "@expo/vector-icons";
import { Text, View } from "react-native";
import Text from "./Text";
import { View } from "react-native";
import ProgressBar from "./progressBar";
type Props = {

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Feather } from "@expo/vector-icons";
import { Pressable, Text, View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "./Text";
type Props = {