File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,18 @@ const styles = StyleSheet.create({
148
148
- ` itemsContainerStyle ` - style object for the content section
149
149
- ` itemStyle ` - style object for the single item, which can contain an Icon and/or a Label
150
150
- ` labelStyle ` - style object to overwrite ` Text ` style inside content section, when your label is a string
151
+ - ` iconContainerStyle ` - style object to overwrite ` View ` icon container styles.
152
+
151
153
#### Example:
152
154
153
155
``` js
154
156
contentOptions: {
155
157
activeTintColor: ' #e91e63' ,
156
158
itemsContainerStyle: {
157
159
marginVertical: 0 ,
160
+ },
161
+ iconContainerStyle: {
162
+ opacity: 1
158
163
}
159
164
}
160
165
```
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ type Props = {
29
29
itemsContainerStyle ? : ViewStyleProp ,
30
30
itemStyle ?: ViewStyleProp ,
31
31
labelStyle ?: TextStyleProp ,
32
+ iconContainerStyle ?: ViewStyleProp ,
32
33
} ;
33
34
34
35
/**
@@ -48,6 +49,7 @@ const DrawerNavigatorItems = ({
48
49
itemsContainerStyle,
49
50
itemStyle,
50
51
labelStyle,
52
+ iconContainerStyle,
51
53
} : Props ) => (
52
54
< View style = { [ styles . container , itemsContainerStyle ] } >
53
55
{ items . map ( ( route : NavigationRoute , index : number ) => {
@@ -69,7 +71,13 @@ const DrawerNavigatorItems = ({
69
71
>
70
72
< View style = { [ styles . item , { backgroundColor } , itemStyle ] } >
71
73
{ icon ? (
72
- < View style = { [ styles . icon , focused ? null : styles . inactiveIcon ] } >
74
+ < View
75
+ style = { [
76
+ styles . icon ,
77
+ focused ? null : styles . inactiveIcon ,
78
+ iconContainerStyle ,
79
+ ] }
80
+ >
73
81
{ icon }
74
82
</ View >
75
83
) : null }
You can’t perform that action at this time.
0 commit comments