From a54797df7ae3b97ecf838dae136ad9530415e7ad Mon Sep 17 00:00:00 2001 From: safary Date: Tue, 23 Jun 2020 13:34:27 +0200 Subject: [PATCH] Revert "chore: add icons stories (#1524)" This reverts commit 20be9638f9db39d86285b3901c171b2425741b87. --- src/icons/Icons.stories.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/icons/Icons.stories.js diff --git a/src/icons/Icons.stories.js b/src/icons/Icons.stories.js deleted file mode 100644 index f7b151700..000000000 --- a/src/icons/Icons.stories.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react' -import { storiesOf } from '@storybook/react' -import { withKnobs, text, number, color } from '@storybook/addon-knobs' - -const requireContext = require.context('.', true, /\.js?$/) -const modules = requireContext.keys().filter((c) => !c.includes('.stories')) -const icons = modules.map(m => ({ - name: m.replace('./', '').replace('.js', ''), - Icon: requireContext(m).default -})) - -const filterByTextQuery = (icon) => { - const searchQuery = text('Search', '') - return icon.name.includes(searchQuery) -} - -storiesOf('Icons', module) - .addDecorator(withKnobs) - .add('List', () => { - const size = number('Size', 32, { range: true, min: 1, max: 200, step: 1 }) - const fill = color('Fill', undefined) - const stroke = color('Stroke', undefined) - - return ( -
- {icons.filter(filterByTextQuery).map(({ Icon, name }) => ( -
- - { name } -
) - )} -
- ) - })