reactjs - Gradient Background for TabBar? -


i'm trying make background of tabnavigator gradient. documentation @ https://facebook.github.io/react-native/docs/colors.html indicates color properties match how css works on web. went https://developer.mozilla.org/en-us/docs/web/css/linear-gradient , read because s belong data type, can used s can used. reason, linear-gradient() won't work on background-color , other properties use data type.

consequently, following won't work:

import { tabnavigator, tabbarbottom } 'react-navigation';  export default tabnavigator(   {     home: {       screen: homescreen,     },   . . .   },   {     navigationoptions: ({ navigation }) => ({       tabbaricon: ....     tabbarcomponent: tabbarbottom,     tabbarposition: 'bottom',     animationenabled: false,     swipeenabled: false,     tabbaroptions: {       activetintcolor: 'rgb(111, 111, 111)',       labelstyle: {         fontsize: 12,       },       style: {         backgroundcolor: 'linear-gradient(45deg, blue, red)',       },     }   } ); 

which clear documentation. isn't clear work.

you replace tabbarcomponent own component, , there use react-native-linear-gradient.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - VueJS2 and the Window Object - how to use? -