Item: remove isAction, use onClick to discriminate if it should render as button#35152
Merged
Item: remove isAction, use onClick to discriminate if it should render as button#35152
Item: remove isAction, use onClick to discriminate if it should render as button#35152Conversation
|
Size Change: -3.72 kB (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
youknowriad
reviewed
Sep 28, 2021
| import { useCx } from '../../utils/hooks/use-cx'; | ||
| import type { ItemProps } from '../types'; | ||
|
|
||
| function useDeprecatedProps( { |
Contributor
There was a problem hiding this comment.
Not sure we need this since this component is experimental and probably only used in Gutenberg.
Contributor
Author
There was a problem hiding this comment.
ItemGroup was promoted in #33701 and released in Gutenberg 11.3, but it's always been marked as experimental and, as you said, doesn't probably any usages outside of Gutenberg. I will go ahead and remove all traces of isAction
youknowriad
approved these changes
Sep 28, 2021
Contributor
youknowriad
left a comment
There was a problem hiding this comment.
This LGTM 👍 Thanks for making that change
Item: mark isAction as deprecated, use onClick to discriminate if it should render as buttonItem: remove isAction, use onClick to discriminate if it should render as button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR explores an idea that was born in #35142 (comment), where the
isActionprop is being removed. TheItemcomponent would instead render as abuttonif theonClickprop is present (while still giving priority to theasprop in any case when specified).How has this been tested?
Types of changes
Refactor (including removal of a prop on an experimental component).
Checklist:
*.native.jsfiles for terms that need renaming or removal).