-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/design review #52
Conversation
</Headline> | ||
<Body style={styles.content}>{props.content}</Body> | ||
<View style={styles.actions}> | ||
{props.onDismiss && props.dismissButtonLabel && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The onDismiss
props is mandatory so I think checking only dismissButtonLabel
is enough here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: this optional "dismiss" button does not exists in the design system.
We need to ask the UX to update it accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found only one case, where the dialog appears with single button, so that's why one of the buttons are conditional here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info, I will show it to the UX :)
src/components/buttons/Button.tsx
Outdated
} else { | ||
return ( | ||
<BaseButton style={style} labelStyle={labelStyle} onPress={onClick} testID={testID}> | ||
<BaseButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it I think it's not a good idea to fallback to the default react-native-paper's Button component if no mode
props has been provided.
I cannot tell what it looks like quickly because it is not in the design system.
Would you mind to provide a default value to the mode
props instead ? Like filled
?
marginHorizontal: 0, | ||
...labelStyle, | ||
const getbackgroundColor = (): ViewStyle['backgroundColor'] => { | ||
switch (status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this function in it's own file (like utils
), so that we can reuse it in the 3 button variants ?
Something like getColor(status) -> string
so it could be reused without being concerned wether we want to set the background color, the text color or the border color ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated :)
<Stack.Navigator initialRouteName="Home"> | ||
<Stack.Navigator | ||
screenOptions={{ | ||
contentStyle: { backgroundColor: '#FFF' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neutral[50]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i tried to use theme there, but it returns an error as i try to use it outside ThemeProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely should use the ThemeProvider then !
No description provided.