WordPress Block Development – trouble importing from @wordpress/icons


I am running into some trouble in importing the wordpress icons package. Trying to do what is described on this page.


Just like every other package, I have imported the package via npm, then placed the import statement at the top of my file.

import { pin, list, grid } from 'wordpress user/icons';

and then using it like this.

<Placeholder icon={ pin } label={ __( 'My Projects' ) }>

When I view the block in the editor, my block is now broken and I get an error in the console:

TypeError: Cannot read property ‘pin’ of undefined

Is there an extra step I need to take to get the icon package to work?

, PattyOK 3 years 2020-06-01T12:10:21-05:00 0 Answers 83 views 0

Leave an answer