Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gist for my article: 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() {
render() {
return (
<Icon className="icon" icon={icons.github}/>
<h4>Component with icon</h4>
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.