Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(drawer): to allow developer to override styles for DrawerItem Li… #11346

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/drawer/src/views/DrawerItem.tsx
Expand Up @@ -77,6 +77,10 @@ type Props = {
* Style object for the label element.
*/
labelStyle?: StyleProp<TextStyle>;
/**
* Style object for the wrapper LinkPressable element.
*/
wrapperStyle?: StyleProp<TextStyle>;
/**
* Style object for the wrapper element.
*/
Expand Down Expand Up @@ -167,6 +171,7 @@ export function DrawerItem(props: Props) {
icon,
label,
labelStyle,
wrapperStyle,
focused = false,
allowFontScaling,
activeTintColor = colors.primary,
Expand Down Expand Up @@ -199,7 +204,7 @@ export function DrawerItem(props: Props) {
<LinkPressable
testID={testID}
onPress={onPress}
style={[styles.wrapper, { borderRadius }]}
style={[styles.wrapper, { borderRadius }, wrapperStyle]}
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
accessibilityState={{ selected: focused }}
Expand Down