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

Buttons accept HTMLButton props #4221

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

maxphilippov
Copy link
Collaborator

  • make Button and some other components accept HTMLButton props
  • rename Button.props.type to styling so we don't conflict with

- make Button and some other components accept HTMLButton props
- rename Button.props.type to styling so we don't conflict with
  <button type="">
@maxphilippov
Copy link
Collaborator Author

A lot of files touched, but pretty straightforward:

  • Button accepts all properties of HTMLButton (type renamed to styling to avoid conflict with <button type="">)
  • FooterActionButton accepts all properties of Button (danger replaced with styling="danger" where applicable)
  • ClickForFullscreenAvatarWrapper also passes all of the HTMLButton props further

Rationale:

  • we're working with focus in Dialog right now so it's useful to specify things like "autoFocus" and "formMethod"
  • it's also much cleaner without repeating what's already defined in HTML types

Copy link
Member

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

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

styling of the buttons in profile creation is lost.

@maxphilippov
Copy link
Collaborator Author

Okay, that was very silly of me

Copy link
Collaborator

@WofWca WofWca left a comment

Choose a reason for hiding this comment

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

Did not test, but the idea is good IMO.

@Simon-Laux Simon-Laux merged commit 48e755d into main Oct 22, 2024
10 checks passed
@Simon-Laux Simon-Laux deleted the maxph/button-component-cleanup branch October 22, 2024 14:26
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