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

Implement custom Button component using Pressable #22

Open
sharnik opened this issue Apr 14, 2023 · 0 comments
Open

Implement custom Button component using Pressable #22

sharnik opened this issue Apr 14, 2023 · 0 comments
Assignees

Comments

@sharnik
Copy link
Member

sharnik commented Apr 14, 2023

In every project we end up creating a custom Button component. We can already do this at the level of our template.

Expected outcome

  • Button is implemented using the Pressable primitive
  • Button expects text label and/or icon
  • We have a disabled state for non active buttons
  • We handle the press event by changing opacity
  • We offer two flavours: Primary (a button with clear border outline and a background colour) and Secondary (just text on transparent background, like we have currently "increment counter")
  • Button accepts a style property to overwrite styles when needed (that allows us to easily create derivative button classes from it)

Notes

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

No branches or pull requests

2 participants