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(821): Rename size to iconSize in CloseButton #852

Closed
wants to merge 1 commit into from

Conversation

bmansell
Copy link
Contributor

  • Rename the size prop to iconSize to prevent type conflicts between Button and CloseButton
  • Update snapshots

Closes #821

- Rename the prop and in the component and for the type as well
- Update snapshots
@bmansell bmansell requested a review from craigpalermo June 17, 2020 16:07
@codecov-commenter
Copy link

Codecov Report

Merging #852 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #852   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           52        52           
  Lines          521       521           
=========================================
  Hits           521       521           
Impacted Files Coverage Δ
packages/core/src/CloseButton/CloseButton.js 100.00% <100.00%> (ø)

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 dec990b...8e875ad. Read the comment docs.

@bmansell bmansell requested a review from sdalonzo June 17, 2020 16:40
Copy link
Contributor

@pcln-james pcln-james left a comment

Choose a reason for hiding this comment

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

I know it sucks but this would be a breaking change, so we should hold off on this for now 😞

Copy link
Collaborator

@craigpalermo craigpalermo left a comment

Choose a reason for hiding this comment

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

Was going to say the same thing as @James300 😞

title: 'close',
}

CloseButton.propTypes = {
onClick: PropTypes.func,
size: PropTypes.number,
iconSize: PropTypes.number,
Copy link
Collaborator

Choose a reason for hiding this comment

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

For consistency, I think it'd make sense to keep size, but change it to use the same values as size on Button. Then, we could add iconSize, which would control the size of the icon. However, if we remove size or change it so it no longer accepts a number, I think that would be a breaking change.

@bmansell
Copy link
Contributor Author

Closing as we need a better, less break-y way to do this.

@bmansell bmansell closed this Jun 17, 2020
@bmansell bmansell deleted the fix-821-close-button-size-prop-rename branch June 17, 2020 17:10
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.

CloseButtonProps size type conflicts with inherited ButtonProps type
5 participants