Skip to content

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

Merged
kodiakhq[bot] merged 3 commits into
carbon-design-system:mainfrom
lewandom:typescript-button
Jun 16, 2023
Merged

refactor(Button): convert Button component family to TypeScript#13811
kodiakhq[bot] merged 3 commits into
carbon-design-system:mainfrom
lewandom:typescript-button

Conversation

@lewandom

Copy link
Copy Markdown
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

netlify Bot commented May 16, 2023

Copy link
Copy Markdown

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

netlify Bot commented May 16, 2023

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

@alisonjoseph @tay1orjones can you take another look?

@tay1orjones tay1orjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@andreancardona andreancardona left a comment

Copy link
Copy Markdown
Contributor

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