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

fix(button): Support anchor and button HTML attributes (#679) #680

Merged
merged 1 commit into from Feb 15, 2019
Merged

fix(button): Support anchor and button HTML attributes (#679) #680

merged 1 commit into from Feb 15, 2019

Conversation

ghost
Copy link

@ghost ghost commented Feb 15, 2019

I've chosen to extend React.AnchorHTMLAttributes<T> and React.ButtonHTMLAttributes<T> since these are the possible element types that can be rendered. However looking through the other components you seem to use HTMLProps<T> a lot as well. There doesn't seem to be any clear reason why this is used in some places and not in others.

I'm happy to change this to use HTMLProps<T> instead if that is the pattern you want to follow. It would make button consistent with icon-button.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

Googlers can find more info about SignCLA and this PR by following this link.

@codecov-io
Copy link

codecov-io commented Feb 15, 2019

Codecov Report

Merging #680 into rc0.10.0 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           rc0.10.0     #680   +/-   ##
=========================================
  Coverage     94.88%   94.88%           
=========================================
  Files            68       68           
  Lines          2852     2852           
  Branches        432      432           
=========================================
  Hits           2706     2706           
  Misses           50       50           
  Partials         96       96
Impacted Files Coverage Δ
packages/button/index.tsx 96.66% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02da75c...838fbae. Read the comment docs.

@ghost
Copy link
Author

ghost commented Feb 15, 2019

I signed it!

Copy link

@moog16 moog16 left a comment

Choose a reason for hiding this comment

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

@ben-mckernan you're right - this should at the very least been extending from HTMLProps. Not sure how this one snuck through the PR process without it. This looks good to me, as you're right the button can be an anchor or button element.

Thanks for fixing.

@moog16 moog16 merged commit 291cb67 into material-components:rc0.10.0 Feb 15, 2019
@moog16
Copy link

moog16 commented Feb 15, 2019

CLA was not passing, but signed in #680 (comment)

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