-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add a grey block for the editor preview. #51
Conversation
|
||
const EditView = ( { className } ) => { | ||
return ( | ||
<div className={ className }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a Placeholder
component you could use for this: https://github.com/WordPress/gutenberg/tree/master/packages/components/src/placeholder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, the icon that comes out of the icon package and the dashicon
that is provided to the block config are different. I definitely want to keep the icon because when it's not focused, it's not evident that the block is related.
It's also a bit confusing to me that the @wordpress/icons
package doesn't resolve unless its explicitly installed. Any idea what's going on there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird. The example has the SVG exported and then the reference passed in. I guess, if you just pass the string it falls back to dashicons. That's unexpected. I can update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's apparently how it works:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think they've been updating to move away from dashicons in general, so @wordpress/icons
is a new package of new icons, but it's still in transition — see WordPress/gutenberg#20464
It's also a bit confusing to me that the @wordpress/icons package doesn't resolve unless its explicitly installed.
Might be a versioning issue, if you're not using the GB plugin, or using an older version.
Prefer #60 |
This PR: