Skip to content

Conversation

@PoorTable
Copy link
Collaborator

#22

Screenshot 2023-05-17 at 20 40 03

@PoorTable PoorTable requested a review from sharnik May 17, 2023 19:01
@PoorTable PoorTable self-assigned this May 17, 2023
type RoundButtonType = 'primary' | 'secondary'

export type BaseButtonPropsType = {
isDisabled?: boolean | null
Copy link
Member

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.

Copy link
Collaborator Author

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
Copy link
Member

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

Copy link
Collaborator Author

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
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

ANGRY = '#dd3333',
DEEP_PURPLE = '#5D2555',
TRANSPARENT = 'rgba(0, 0, 0, 0)',
TRANSPARENT_DISABLED_BUTTON = 'rgba(0,0,1,0.14)',
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for noticing, renamed

@PoorTable PoorTable requested a review from sharnik May 18, 2023 11:07
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.

3 participants