Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist for my article: WordPress: Adding custom svg icons to your Gutenberg blocks/plugin. https://since1979.dev/wordpress-adding-custom-svg-icons-to-your-gutenberg-blocks-plugin/
import React from 'react'
import icons from '../icons/icons.js'
const { Icon } = wp.components;
class ComponentWithIcon extends React.Component {
constructor() {
super()
}
render() {
return (
<div>
<Icon className="icon" icon={icons.github}/>
<h4>Component with icon</h4>
</div>
)
}
}
export default ComponentWithIcon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.