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

Send props to Dashicon. #14631

Merged
merged 10 commits into from
Mar 27, 2019
Merged

Send props to Dashicon. #14631

merged 10 commits into from
Mar 27, 2019

Conversation

etoledom
Copy link
Contributor

@etoledom etoledom commented Mar 26, 2019

This PR is a continuation of #13977, and was simplified thanks to this suggestion: #13977 (comment) from @aduth .

gutenberg-mobile side PR: wordpress-mobile/gutenberg-mobile#628

Dashicon was modified to allow set colors and style on Mobile.
With these modifications, we can now do this:

<ToolbarButton
	label={ __( 'Add block' ) }
	icon={ ( <Dashicon icon="plus-alt" style={ styles.addBlockButton } color={ styles.addBlockButton.color } /> ) }
	onClick={ onInsertClick }
	iconProps={ { style: styles.addBlockButton, color: styles.addBlockButton.color } }
/>

And let ToolbarButton (or IconButton) use a Dashicon component setup on any way we need it to.

I will modify https://github.com/WordPress/dashicons/tree/master/sources/react after this PR gets merged.

@etoledom etoledom added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Mar 26, 2019
@etoledom etoledom self-assigned this Mar 26, 2019
@etoledom etoledom requested review from Tug and aduth March 26, 2019 10:49
@Tug
Copy link
Contributor

Tug commented Mar 26, 2019

I feel we've came back to the original logic now, I don't feel the proposed changes either improve or decrease the quality or logic of the code. Am I missing something?

Copy link
Contributor

@Tug Tug left a comment

Choose a reason for hiding this comment

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

Ok those were changes suggested in #13977

LGTM 🚢

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

This is what we discussed in #13977. Let's 🚢 Thanks for wrangling it 🙇

@gziolo gziolo added the [Feature] UI Components Impacts or related to the UI component system label Mar 27, 2019
@gziolo gziolo added this to the 5.4 (Gutenberg) milestone Mar 27, 2019
@gziolo gziolo merged commit b79710b into master Mar 27, 2019
@youknowriad youknowriad deleted the rnmobile/add-block-icon-color-v2 branch March 27, 2019 09:57
@aduth
Copy link
Member

aduth commented Mar 27, 2019

It's not clear to me from the follow-up work whether it's still intended to remove ariaPressed as a prop of Dashicon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants