timomeh / react-native-material-bottom-navigation

💅🔧👌 a beautiful, customizable and easy-to-use material design bottom navigation for react-native
MIT License
709 stars 127 forks source link

how to change icon using my own icon #57

Closed yuni27 closed 6 years ago

yuni27 commented 6 years ago

I wanna change the icon with my own icon (icon.io), at the default it using react element. Can u explain how to change it? thanks before

timomeh commented 6 years ago

Take a look at the documentation at https://oblador.github.io/react-native-vector-icons/, there's a section for own icons.

I'm going to close this issue since it's not related to this project.

yuni27 commented 6 years ago

i mean, i wanna change the icon from my own folder, not from that react native icon.

timomeh commented 6 years ago

As I said, you can use react-native-vector-icons to define own icons. Or use an image or any other icon component you want, the BottomNavigation doesn't care.

Dineshchitta commented 6 years ago

I have done like this.

import {Image} from 'react-native'
const ownIcon = React.createElement(Image, {
  source: require('youricon.png')
})

Usage with Tab

<Tab
   label={'Home'}
   icon={ownIcon}
  />