hoaphantn7604 / react-native-curved-bottom-bar

A high performance, beautiful and fully customizable curved bottom navigation bar for React Native.
MIT License
468 stars 98 forks source link

Bottom padding to <CurvedBottomBar.Navigator /> component style #60

Open alexandermirzoyan opened 1 year ago

alexandermirzoyan commented 1 year ago

I am facing such an issue when I want to set a space from bottom of component.

<CurvedBottomBar.Navigator
  style={styles.bottomBar}
  shadowStyle={styles.bottomBarShadow}
>
  {...}
</CurvedBottomBar.Navigator>

const styles = StyleSheet.create({
  bottomBar: {
    backgroundColor: 'yellow',
    paddingBottom: scale(20),
  },
  bottomBarShadow: {
    backgroundColor: 'red',
    shadowColor: '#000',
    shadowOffset: {
      width: 0,
      height: 0.5,
    },
    shadowOpacity: 0.2,
    shadowRadius: 1.41,
    elevation: 1,
  },
});
image

When I remove backgroundColor property from bottomBarShadow selector, the bottomBar selector's color renders in that place, and there is no way to set color to only bottom part.

Screenshot 2023-04-15 at 20 17 22
dante-cervantes-rocketlab commented 9 months ago

hi @alexandermirzoyan i was able to fix the issue wrapping the CurvedBottomBar into a View, and apply the styles to that view.

i.e

<View style={{ flex: 1, paddingBottom: 20, backgroundColor: 'black' }}>
   // your CurvedBottomBar here
</View>

Captura de pantalla 2023-12-10 a la(s) 22 18 33