refactor(TabBar, HomeScreen): update styles for improved UI consistency
- Adjusted TabBar styles for better shadow effects and padding. - Modified HomeScreen layout margins and padding for enhanced spacing. - Updated font weight for modernTabText to improve text visibility. - Changed active opacity for tab interactions to enhance user experience.
This commit is contained in:
@@ -135,26 +135,33 @@ function createTabBarStyles(colors: AppColors) {
|
||||
modernContainer: {
|
||||
flexDirection: 'row',
|
||||
backgroundColor: colors.background.paper,
|
||||
borderRadius: borderRadius.xl,
|
||||
borderRadius: borderRadius['2xl'],
|
||||
marginHorizontal: spacing.lg,
|
||||
marginVertical: spacing.md,
|
||||
marginVertical: spacing.sm,
|
||||
padding: spacing.xs,
|
||||
shadowColor: colors.chat.shadow,
|
||||
shadowOffset: { width: 0, height: 2 },
|
||||
shadowOpacity: 0.08,
|
||||
shadowRadius: 8,
|
||||
elevation: 3,
|
||||
shadowOffset: { width: 0, height: 4 },
|
||||
shadowOpacity: 0.1,
|
||||
shadowRadius: 16,
|
||||
elevation: 6,
|
||||
},
|
||||
modernTab: {
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingVertical: spacing.sm,
|
||||
paddingVertical: spacing.md,
|
||||
paddingHorizontal: spacing.sm,
|
||||
borderRadius: borderRadius.lg,
|
||||
position: 'relative',
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
modernTabActive: {
|
||||
backgroundColor: colors.primary.main + '15',
|
||||
backgroundColor: colors.primary.main + '12',
|
||||
shadowColor: colors.primary.main + '20',
|
||||
shadowOffset: { width: 0, height: 2 },
|
||||
shadowOpacity: 0.1,
|
||||
shadowRadius: 8,
|
||||
elevation: 3,
|
||||
},
|
||||
modernTabContent: {
|
||||
flexDirection: 'row',
|
||||
@@ -165,7 +172,7 @@ function createTabBarStyles(colors: AppColors) {
|
||||
marginRight: spacing.xs,
|
||||
},
|
||||
modernTabText: {
|
||||
fontWeight: '500',
|
||||
fontWeight: '600',
|
||||
fontSize: fontSizes.md,
|
||||
},
|
||||
modernTabTextActive: {
|
||||
@@ -206,7 +213,7 @@ const TabBar: React.FC<TabBarProps> = ({
|
||||
key={index}
|
||||
style={[styles.modernTab, isActive && styles.modernTabActive]}
|
||||
onPress={() => onTabChange(index)}
|
||||
activeOpacity={0.85}
|
||||
activeOpacity={0.7}
|
||||
>
|
||||
<View style={styles.modernTabContent}>
|
||||
{icon && (
|
||||
|
||||
@@ -67,7 +67,7 @@ function createHomeStyles(colors: AppColors) {
|
||||
},
|
||||
searchWrapper: {
|
||||
paddingTop: spacing.lg,
|
||||
paddingBottom: spacing.sm,
|
||||
paddingBottom: spacing.xs,
|
||||
shadowColor: 'transparent',
|
||||
shadowOffset: { width: 0, height: 0 },
|
||||
shadowOpacity: 0,
|
||||
@@ -75,8 +75,8 @@ function createHomeStyles(colors: AppColors) {
|
||||
elevation: 0,
|
||||
},
|
||||
homeTabBar: {
|
||||
marginTop: spacing.xs,
|
||||
marginBottom: spacing.sm,
|
||||
marginTop: spacing.sm,
|
||||
marginBottom: spacing.md,
|
||||
},
|
||||
viewToggleBtn: {
|
||||
width: 44,
|
||||
|
||||
Reference in New Issue
Block a user