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

refactor(Button): convert Button component family to TypeScript #13811

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

lewandom
Copy link
Contributor

Closes #13229

Add TypeScript typings to Button, ButtonSkeleton, DangerButton and ButtonSet components.

Changelog

Changed

  • Added TypeScript types to Button, ButtonSkeleton, DangerButton and ButtonSet components

Removed

  • Removed the previously deprecated ButtonSkeleton.small property to match Button contract

Testing / Reviewing

The Button component family imports for the storybook should be valid and rendering. In a TypeScript environment, you should be able to import and reference the Button family component and its typings.

@lewandom lewandom requested review from a team as code owners May 16, 2023 15:01
@netlify
Copy link

netlify bot commented May 16, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 72f69b1
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/648c12f8a560f20008f7ec48
😎 Deploy Preview https://deploy-preview-13811--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 16, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 72f69b1
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/648c12f8124abd0008f20c1b
😎 Deploy Preview https://deploy-preview-13811--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 25 to 26
[`${prefix}--btn--sm`]: small || size === 'sm',
[`${prefix}--btn--md`]: size === 'field' || size === 'md',
Copy link
Member

Choose a reason for hiding this comment

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

This could possibly be a breaking change, even if it should have been deprecated before now? thoughts @tay1orjones ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tay1orjones can you comment on the above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tay1orjones can you take a look?

Copy link
Contributor

Choose a reason for hiding this comment

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

hey @lewandom Taylor is OOO until next week - we'll make sure to take a look early next week :)

Copy link
Member

Choose a reason for hiding this comment

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

@lewandom Hey sorry for the delay! Yeah unfortunately we'll need to leave small in for now and mark it as deprecated.

The removal of the check for field should be fine though, that's no longer an accepted value for size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tay1orjones restored, please check.

@lewandom lewandom force-pushed the typescript-button branch from 3c5e950 to f1dcd2a Compare June 9, 2023 10:42
@lewandom lewandom requested a review from tay1orjones June 9, 2023 10:43
@lewandom
Copy link
Contributor Author

@alisonjoseph @tay1orjones can you take another look?

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Copy link
Contributor

@andreancardona andreancardona left a comment

Choose a reason for hiding this comment

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

lgtm!!

@lewandom lewandom force-pushed the typescript-button branch from 47085f2 to 72f69b1 Compare June 16, 2023 07:44
@kodiakhq kodiakhq bot merged commit 04644a9 into carbon-design-system:main Jun 16, 2023
@lewandom lewandom deleted the typescript-button branch November 6, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add TypeScript types to Button, ButtonSkeleton, DangerButton, ButtonSet
4 participants