Skip to content

Commit b9d8f3d

Browse files
committed
style(allergens-banner): update styling for improved visibility and aesthetics
1 parent 9a28982 commit b9d8f3d

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/components/Food/allergens-banner.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'
44
import { Animated, Text, TouchableOpacity, View } from 'react-native'
55
import { createStyleSheet, useStyles } from 'react-native-unistyles'
66
import { useFoodFilterStore } from '@/hooks/useFoodFilterStore'
7-
import { getContrastColor } from '@/utils/ui-utils'
87

98
import PlatformIcon from '../Universal/Icon'
109

@@ -77,24 +76,35 @@ export const AllergensBanner = ({
7776

7877
const stylesheet = createStyleSheet((theme) => ({
7978
bannerContainer: {
80-
backgroundColor: theme.colors.secondary,
79+
backgroundColor: theme.colors.primaryBackground,
8180
borderRadius: theme.radius.md,
8281
marginBottom: 10,
8382
marginTop: 2,
84-
padding: 10
83+
padding: 10,
84+
borderWidth: 1,
85+
borderColor: `${theme.colors.primary}20`,
86+
shadowColor: theme.colors.primary,
87+
shadowOffset: {
88+
width: 0,
89+
height: 1
90+
},
91+
shadowOpacity: 0.1,
92+
shadowRadius: 2,
93+
elevation: 2
8594
},
8695
bannerText: {
87-
color: getContrastColor(theme.colors.secondary),
96+
color: theme.colors.text,
8897
fontSize: 14,
89-
marginTop: 3
98+
marginTop: 3,
99+
opacity: 0.8
90100
},
91101
bannerTitle: {
92-
color: getContrastColor(theme.colors.secondary),
102+
color: theme.colors.primary,
93103
fontSize: 16,
94104
fontWeight: 'bold'
95105
},
96106
contrastColor: {
97-
color: getContrastColor(theme.colors.secondary)
107+
color: theme.colors.primary
98108
},
99109
dismissButton: {
100110
borderRadius: theme.radius.md,

0 commit comments

Comments
 (0)