/** * External dependencies */ import { omitBy, omit, map } from 'lodash'; import { useState } from '@wordpress/element'; /** * Internal dependencies */ import Icon from '../icon'; import * as icons from '../index'; const availableIcons = omit( icons, 'Icon' ); export default { title: 'WooCommerce Blocks/@woocommerce/icons', component: Icon, }; const LibraryExample = () => { const [ filter, setFilter ] = useState( '' ); const filteredIcons = omitBy( availableIcons, ( _icon, name ) => { return ! name.includes( filter ); } ); return (