Apply styles to drawer section items
See original GitHub issueI want to apply some styles to drawer section
- Apply background color to drawer section
- Change icon color and size
- Change fontsize and color of value
My code `
<Drawer style={{container:{backgroundColor:'#f4f4f4'}}}>
<Drawer.Section style={{container:{backgroundColor:'#f4f4f4'},icon:{color:'red'},value:{color:'green',fontSize:20}}}
items={[
{ icon: 'home', value: 'Recent Posts', onPress:this.recentPostFunction=()=>{this.contentFunction('recent')} },
{ icon: 'format-list-bulleted', value: 'My Posts', onPress:this.recentPostFunction=()=>{this.contentFunction('mypost')} },
]}
/>
</Drawer>`
Only the drawer background color is changed. Other styles not applied. How to apply it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Drawer Navigator | React Navigation
To add additional items in the drawer, you can use the DrawerItem component: ... Style object to apply to the Text style inside...
Read more >Custom Drawer in react navigation - Stack Overflow
In my react native project I have custom drawer with screens like screen1 and screen2. Screen1 is used for stack navigator and in...
Read more >Drawer.Section · React Native Paper
Drawer.Section. A component to group content inside a navigation drawer. ... Item label="First Item" active={active === 'first'} onPress={() ...
Read more >Customizing React Navigation Drawer | by Ike Njoku - Medium
Drawer options are rendered as DrawerItems. These are contained in a SafeAreaView component, which is usually nested in a ScrollView to ensure ...
Read more >Android Material Component: Navigation Drawer Styling (Part II)
And since each item is made of several elements (icon, text, background), you have to think about the states of each element to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
<Drawer.Section title={ <Text style={{color: colors.textColor}}>Preferences</Text> }> </Drawer.Section>
Looks like it’s still an issue. Drawer Section item styles (e.g. font size) are not working, neither when specified as a style prop or when passed in to ThemeProvider.