Jm-Zion / rn-wave-bottom-bar

🌊 Animated Tab Bottom Bar for react-navigation
MIT License
334 stars 27 forks source link

React Native RTL issue #582

Open mktufan21 opened 2 months ago

mktufan21 commented 2 months ago

The code is not working perfectly when I am changing to right to left , below I have added some dummy code to check I tried to add isRtl={I18nManager.isRTL} but looks like it is not working perfactly

there are some overlapping of component

<Tab.Navigator
            initialRouteName={TABS_ROUTES.ACCOUNT}
            tabBar={(props) => (
                <BottomFabBar
                    mode="default"
                    isRtl={I18nManager.isRTL}
                    focusedButtonStyle={{
                        shadowColor: '#000',
                        shadowOffset: {
                            width: 0,
                            height: 7,
                        },
                        shadowOpacity: 0.41,
                        shadowRadius: 9.11,
                        elevation: 14,
                    }}
                    bottomBarContainerStyle={{
                        position: 'absolute',
                        bottom: 0,
                        left: 0,
                        right: 0,
                    }}
                    {...props}
                />
            )}>
            <Tab.Screen
                name={TABS_ROUTES.ACCOUNT}
                component={HomeStack}
                options={({route}) => ({
                    headerShown: false,
                    tabBarLabel: t('accountMenuTitle'),
                    tabBarIcon: tabBarIcon(route),
                })}
            />
            <Tab.Screen
                name={TABS_ROUTES.PROJECTS}
                component={ProjectStack}
                options={({route}) => ({
                    headerShown: false,
                    tabBarLabel: t('projectMneuTitle'),
                    tabBarIcon: tabBarIcon(route),
                })}
            />
            <Tab.Screen
                name={TABS_ROUTES.INVOICE}
                component={InvoiceStack}
                options={({route}) => ({
                    headerShown: false,
                    tabBarLabel: t('invoiceMenuTitle'),
                    tabBarIcon: tabBarIcon(route),
                })}
            />
            <Tab.Screen
                name={TABS_ROUTES.SHARED}
                component={SharedResourceStack}
                initialParams={{
                    mfFooterConfig: homeFooterConfig.MAP_HOME,
                }}
                options={({route}) => ({
                    headerShown: false,
                    tabBarLabel: t('sharedMenuTitle'),
                    tabBarIcon: tabBarIcon(route),
                })}
            />
            <Tab.Screen
                name={TABS_ROUTES.MORE}
                component={MoreStack}
                options={({route}) => ({
                    headerShown: false,
                    tabBarLabel: t('moreMenuTitle'),
                    tabBarIcon: tabBarIcon(route),
                })}
            />
        </Tab.Navigator>
Screenshot 2024-08-29 at 12 51 15 AM Screenshot 2024-08-29 at 12 50 34 AM

If I add a background Color overlap issue gone but icon look like this

bottomBarContainerStyle={{
                        position: 'absolute',
                        bottom: 0,
                        left: 0,
                        right: 0,

backgroundColor: '#FFFFFF',
                    }}
Screenshot 2024-08-29 at 1 18 24 AM

This is in Normal Mode

Screenshot 2024-08-29 at 1 20 40 AM