upd: redesign aplikasi
Deskripsi: - update home, profile dll - blm selesai NO Issues
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { View, StyleProp, ViewStyle } from "react-native";
|
||||
import Text from "./Text";
|
||||
@@ -10,10 +10,20 @@ type Props = {
|
||||
style?: StyleProp<ViewStyle>
|
||||
}
|
||||
export default function LabelStatus({ category, text, size, style }: Props) {
|
||||
const { colors } = useTheme();
|
||||
|
||||
const backgroundColor = {
|
||||
primary: colors.primary,
|
||||
success: colors.success,
|
||||
warning: colors.warning,
|
||||
error: colors.error,
|
||||
secondary: colors.dimmed,
|
||||
}[category] || 'gray'; // Removed ColorsStatus[category]?.backgroundColor as ColorsStatus is removed
|
||||
|
||||
return (
|
||||
<View style={[
|
||||
size == "small" ? Styles.labelStatusSmall : Styles.labelStatus,
|
||||
ColorsStatus[category],
|
||||
{ backgroundColor },
|
||||
Styles.round10,
|
||||
Styles.contentItemCenter,
|
||||
style
|
||||
|
||||
Reference in New Issue
Block a user