Skip to content

Commit 45c639f

Browse files
authored
Drawer item custom icon and text colors (#3691)
1 parent 1b93f40 commit 45c639f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/drawer/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ interface DrawerItemProps {
1616
width?: number;
1717
background?: string;
1818
text?: string;
19+
textColor?: string;
1920
icon?: number;
21+
iconColor?: string;
2022
onPress?: Function;
2123
keepOpen?: boolean;
2224
style?: ViewStyle;
@@ -347,7 +349,7 @@ class Drawer extends PureComponent<DrawerProps> {
347349
{
348350
width: itemsIconSize,
349351
height: itemsIconSize,
350-
tintColor: itemsTintColor,
352+
tintColor: item.iconColor || itemsTintColor,
351353
opacity,
352354
transform: [{scale}]
353355
}
@@ -359,7 +361,7 @@ class Drawer extends PureComponent<DrawerProps> {
359361
style={[
360362
styles.actionText,
361363
{
362-
color: itemsTintColor,
364+
color: item.textColor || itemsTintColor,
363365
opacity,
364366
transform: [{scale}]
365367
},

0 commit comments

Comments
 (0)