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

Fix/design review #52

Merged
merged 11 commits into from
Apr 19, 2023
Merged

Fix/design review #52

merged 11 commits into from
Apr 19, 2023

Conversation

Vadim-x-squad
Copy link
Contributor

No description provided.

</Headline>
<Body style={styles.content}>{props.content}</Body>
<View style={styles.actions}>
{props.onDismiss && props.dismissButtonLabel && (
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor Author

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

https://www.figma.com/file/yKsrpzbeh2Q02CA9HJ6tYl/SW-mobile-app---UI?node-id=1196-5676&t=ix8Lh5RFNO9yav2c-4

Copy link
Contributor

@ducdetronquito ducdetronquito Apr 19, 2023

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 :)

} else {
return (
<BaseButton style={style} labelStyle={labelStyle} onPress={onClick} testID={testID}>
<BaseButton
Copy link
Contributor

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) {
Copy link
Contributor

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 ?

Copy link
Contributor Author

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' },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neutral[50]

Copy link
Contributor Author

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

Copy link
Contributor

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 !

@Vadim-x-squad Vadim-x-squad merged commit 9b32945 into main Apr 19, 2023
@Vadim-x-squad Vadim-x-squad deleted the fix/design-review branch April 19, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants