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

chore: Custom button component #19

Closed
wants to merge 2 commits into from
Closed

chore: Custom button component #19

wants to merge 2 commits into from

Conversation

cimigree
Copy link
Contributor

@cimigree cimigree commented Jun 26, 2024

closes #16

Description

  • Creates a button component that wraps Material UI's button
  • Can take a MessageDescriptor or a react node
  • Creates custom colors and custom variants to override Material UI's as specified in the ticket (though I don't know what color light is supposed to be)
  • These customizations make it so we can't use material UI's color and variant, FYI
  • I tried to use the styled() utility, but the outline on the outlined button WOULD NOT TAKE! Material UI kept overriding it.
  • So, this Button uses the sx prop which seems to work
  • Rounds the buttons which Material UI does not
  • Customized the text appearance on the text button
  • I added a variables file for the same colors that are in the mobile app
  • Uses the new Button in the Home component
  • Added an sx prop so that other styles can be passed in. See example in the Home component.

Instructions

  • run the app
  • Play around with the buttons in the Home component to see the possibilities.

Packages Added

Adds Material UI as requested in the ticket. https://mui.com/material-ui/getting-started/installation/

Screenshots

Screenshot 2024-06-27 at 2 09 22 PM

…for material UI button. Uses the button in Home component.
@cimigree cimigree requested review from ErikSin and removed request for ErikSin June 26, 2024 23:15
@cimigree cimigree requested review from achou11 and removed request for achou11 June 27, 2024 18:09
@cimigree cimigree closed this Jul 3, 2024
@cimigree cimigree deleted the feat/button-wrapper branch July 3, 2024 16:51
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.

Create shared Button
1 participant