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: {
|
modernContainer: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
backgroundColor: colors.background.paper,
|
backgroundColor: colors.background.paper,
|
||||||
borderRadius: borderRadius.xl,
|
borderRadius: borderRadius['2xl'],
|
||||||
marginHorizontal: spacing.lg,
|
marginHorizontal: spacing.lg,
|
||||||
marginVertical: spacing.md,
|
marginVertical: spacing.sm,
|
||||||
padding: spacing.xs,
|
padding: spacing.xs,
|
||||||
shadowColor: colors.chat.shadow,
|
shadowColor: colors.chat.shadow,
|
||||||
shadowOffset: { width: 0, height: 2 },
|
shadowOffset: { width: 0, height: 4 },
|
||||||
shadowOpacity: 0.08,
|
shadowOpacity: 0.1,
|
||||||
shadowRadius: 8,
|
shadowRadius: 16,
|
||||||
elevation: 3,
|
elevation: 6,
|
||||||
},
|
},
|
||||||
modernTab: {
|
modernTab: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
paddingVertical: spacing.sm,
|
paddingVertical: spacing.md,
|
||||||
|
paddingHorizontal: spacing.sm,
|
||||||
borderRadius: borderRadius.lg,
|
borderRadius: borderRadius.lg,
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
backgroundColor: 'transparent',
|
||||||
},
|
},
|
||||||
modernTabActive: {
|
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: {
|
modernTabContent: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -165,7 +172,7 @@ function createTabBarStyles(colors: AppColors) {
|
|||||||
marginRight: spacing.xs,
|
marginRight: spacing.xs,
|
||||||
},
|
},
|
||||||
modernTabText: {
|
modernTabText: {
|
||||||
fontWeight: '500',
|
fontWeight: '600',
|
||||||
fontSize: fontSizes.md,
|
fontSize: fontSizes.md,
|
||||||
},
|
},
|
||||||
modernTabTextActive: {
|
modernTabTextActive: {
|
||||||
@@ -206,7 +213,7 @@ const TabBar: React.FC<TabBarProps> = ({
|
|||||||
key={index}
|
key={index}
|
||||||
style={[styles.modernTab, isActive && styles.modernTabActive]}
|
style={[styles.modernTab, isActive && styles.modernTabActive]}
|
||||||
onPress={() => onTabChange(index)}
|
onPress={() => onTabChange(index)}
|
||||||
activeOpacity={0.85}
|
activeOpacity={0.7}
|
||||||
>
|
>
|
||||||
<View style={styles.modernTabContent}>
|
<View style={styles.modernTabContent}>
|
||||||
{icon && (
|
{icon && (
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ function createHomeStyles(colors: AppColors) {
|
|||||||
},
|
},
|
||||||
searchWrapper: {
|
searchWrapper: {
|
||||||
paddingTop: spacing.lg,
|
paddingTop: spacing.lg,
|
||||||
paddingBottom: spacing.sm,
|
paddingBottom: spacing.xs,
|
||||||
shadowColor: 'transparent',
|
shadowColor: 'transparent',
|
||||||
shadowOffset: { width: 0, height: 0 },
|
shadowOffset: { width: 0, height: 0 },
|
||||||
shadowOpacity: 0,
|
shadowOpacity: 0,
|
||||||
@@ -75,8 +75,8 @@ function createHomeStyles(colors: AppColors) {
|
|||||||
elevation: 0,
|
elevation: 0,
|
||||||
},
|
},
|
||||||
homeTabBar: {
|
homeTabBar: {
|
||||||
marginTop: spacing.xs,
|
marginTop: spacing.sm,
|
||||||
marginBottom: spacing.sm,
|
marginBottom: spacing.md,
|
||||||
},
|
},
|
||||||
viewToggleBtn: {
|
viewToggleBtn: {
|
||||||
width: 44,
|
width: 44,
|
||||||
|
|||||||
Reference in New Issue
Block a user