Skip to content

Commit

Permalink
Plugin needs to be in a JS file.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Aug 5, 2022
1 parent 5d94b4b commit fc21fd1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
24 changes: 24 additions & 0 deletions assets/js/components/plugin-icon.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions assets/js/gutenberg-plugin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PluginIcon from '../img/icon.svg';
import { pluginIcon } from './components/plugin-icon';

import { Icon } from '@wordpress/components';
import { select, useSelect } from '@wordpress/data';
Expand Down Expand Up @@ -134,11 +134,7 @@ const RenderDistributedFrom = () => {
* Create the Distributor icon
*/
const DistributorIcon = () => (
<Icon
className="components-panel__icon"
icon={ <PluginIcon /> }
size={ 20 }
/>
<Icon className="components-panel__icon" icon={ pluginIcon } size={ 20 } />
);

/**
Expand Down

0 comments on commit fc21fd1

Please sign in to comment.