Skip to content

Dashicon: remove unnecessary type for className prop#46849

Merged
ciampo merged 3 commits intotrunkfrom
fix/dashicon-remove-unnecessary-classname-type
Jan 3, 2023
Merged

Dashicon: remove unnecessary type for className prop#46849
ciampo merged 3 commits intotrunkfrom
fix/dashicon-remove-unnecessary-classname-type

Conversation

@ciampo
Copy link
Contributor

@ciampo ciampo commented Jan 3, 2023

What?

Follow-up to #45924

Remove unnecessary prop for classname, which is already included in the component props when using the WordrpressComponentProps utility type.

Why?

Code cleanup

How?

Deleted prop type declaration.

Testing Instructions

Project builds without TS errors

@ciampo ciampo self-assigned this Jan 3, 2023
@ciampo ciampo added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Jan 3, 2023
@ciampo ciampo marked this pull request as ready for review January 3, 2023 13:42
@ciampo ciampo requested a review from ajitbohra as a code owner January 3, 2023 13:42
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Good find 👍 className is already provided by the HTMLAttributes interface, implemented (directly or indirectly) by the types of all React HTML elements.

Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
@ciampo ciampo enabled auto-merge (squash) January 3, 2023 15:40
@ciampo ciampo changed the title Dashicon: remove unnecessary type for classname prop Dashicon: remove unnecessary type for className prop Jan 3, 2023
@ciampo ciampo merged commit e71ff47 into trunk Jan 3, 2023
@ciampo ciampo deleted the fix/dashicon-remove-unnecessary-classname-type branch January 3, 2023 16:09
@github-actions github-actions bot added this to the Gutenberg 15.0 milestone Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants