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

Button components #43

Closed
9 tasks done
ddfridley opened this issue Oct 20, 2023 · 3 comments
Closed
9 tasks done

Button components #43

ddfridley opened this issue Oct 20, 2023 · 3 comments
Assignees
Labels

Comments

@ddfridley
Copy link
Contributor

ddfridley commented Oct 20, 2023

This Button component will be the base of all of our buttons.

  • <Button >
<Button
   className="" // may or may not be passed. Should be applied to the outer most tag, after local classNames
   style={} // may or may not be passed, Should be applied to the outer most tag
   onDone=()=>{} // a function that is called when the button is clicked.  - if it exists
   title="" // text to display on hover
   disabled=false
   disableOnClick=false // if true, the button gets disabled after click and stays disabled - prevents resubmission
>
   text or <span></span>
</Button>
  • className may have 'hover' in it. This will occur when the user is hovering over the parent component, and the parent component wants the button to go into the hover state as well. In the styles definition, .hover (the class name) should do the same thing as :hover (the pseudo class).

The width of the button shall be determined by the name passed, but can be over ridden by the style or class.
image

figma

The base shall have the shape and border as shown in figma - based on the Secondary button.

Then create additional components using <Button>, but passing classNames with styles to match the figma

  • <ModifierButton />
  • <SecondaryButtom />
  • <PrimaryButton />
  • <TextButton /> see figma
  • colors and padding and such for styles should be in theme.js - think of reusable names
  • Create Storybook cases for each of the buttons and exercise their props

Stretch goal:

@Jojoliu66 Jojoliu66 self-assigned this Oct 23, 2023
@ddfridley
Copy link
Contributor Author

@Jojoliu66 I just added the TextButton to this.

@ddfridley
Copy link
Contributor Author

@Jojoliu66 I added the requirement that the hover class name be supported.

@ddfridley
Copy link
Contributor Author

Done by PR #64

@ddfridley ddfridley mentioned this issue Mar 18, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants