Skip to content

Allow custom style in dashicon/svg#12403

Closed
koke wants to merge 1 commit intomasterfrom
rnmobile/dashicon-styles
Closed

Allow custom style in dashicon/svg#12403
koke wants to merge 1 commit intomasterfrom
rnmobile/dashicon-styles

Conversation

@koke
Copy link
Copy Markdown
Contributor

@koke koke commented Nov 28, 2018

This extends the previous solution in #11827 by allowing a style prop to be passed to a Dashicon.
The previous solution required Svg being aware of other parts of the app and including hardcoded colors in its CSS.

This change lets you override those and specify the style directly. I haven't changed the existing toolbar icons since IconButton will pass the extra props to Button, not Dashicon

To be tested with wordpress-mobile/gutenberg-mobile#286 for the inline toolbar buttons

@koke koke 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 Nov 28, 2018
@koke koke requested a review from marecar3 November 28, 2018 22:52
koke added a commit to wordpress-mobile/gutenberg-mobile that referenced this pull request Nov 29, 2018
pinarol pushed a commit to wordpress-mobile/gutenberg-mobile that referenced this pull request Nov 30, 2018
* Make the inline toolbar nicer

This replaces the icons with dashicons, tweaks the layout to be closer to the
designs, and removes the unused settings button.

* Only show arrow buttons when you can move the block

* Add borders to block when focused

* Updated colors for inline toolbar and block holder

This imports a color palette taken from calypso instead of the Gutenberg one

* Remove unused imports

* Revert gutenberg

We're skipping WordPress/gutenberg#12403 for now

* Replace InlineToolbarButton as ToolbarButton

* Update subrepo ref to point to rnmobile/dashicon-styles

* Update react-native-aztec to point to master

* Fixed inline toolbar buttons, used to ToolbarButton interface from components

* Update gutenberg subrepo ref to point to master

* Fix lint issues
this.props.className !== nextProps.className ||
this.props.ariaPressed !== nextProps.ariaPressed
this.props.ariaPressed !== nextProps.ariaPressed ||
this.props.style !== nextProps.style
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.

This file is generated by the Dashicons project and copied here verbatim. The files should not be manually revised without an upstream patch.

@koke
Copy link
Copy Markdown
Contributor Author

koke commented Dec 4, 2018

Closing, since we found a way around it that doesn't require to modify dashicons.

@koke koke closed this Dec 4, 2018
@koke koke deleted the rnmobile/dashicon-styles branch December 4, 2018 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants