-
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
implement base button with pressable component #29
base: develop
Are you sure you want to change the base?
Conversation
type RoundButtonType = 'primary' | 'secondary' | ||
|
||
export type BaseButtonPropsType = { | ||
isDisabled?: boolean | null |
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.
For the sake of consistency with the RN Button this prop should be named disabled
.
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.
done
onPress?: () => void | ||
iconAtStart?: ReactElement | ||
iconAtEnd?: ReactElement | ||
text?: string | ReactElement |
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 see you stopped at the 5th iteration of the Button. Take a look at the problems described further: https://www.smashingmagazine.com/2023/01/key-good-component-design-selfishness/#iteration-6 and the final form: hthttps://www.smashingmagazine.com/2023/01/key-good-component-design-selfishness/#me-myself-and-ui
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 now done in favour of flexibility
styleText?: StyleProp<TextStyle> | ||
rootStyle?: StyleProp<ViewStyle> | ||
hitSlop?: null | Insets | number | ||
isLoading?: boolean |
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.
Let's rename this to loading
for the sake of consistency with disabled
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.
Done
template/src/config/ui/colors.ts
Outdated
@@ -8,6 +8,7 @@ enum Palette { | |||
ANGRY = '#dd3333', | |||
DEEP_PURPLE = '#5D2555', | |||
TRANSPARENT = 'rgba(0, 0, 0, 0)', | |||
TRANSPARENT_DISABLED_BUTTON = 'rgba(0,0,1,0.14)', |
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.
Let's not tie the names to how they might be used. Note that we have Palette.ANGRY
not Palette.ERROR_MESSAGE
.
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 noticing, renamed
#22