p5.js-web-editor/client/common/Icon.stories.jsx

19 lines
338 B
React
Raw Normal View History

2020-04-19 20:30:32 +02:00
import React from 'react';
import { select } from '@storybook/addon-knobs';
import Icon from './Icon';
export default {
title: 'Common/Icon',
component: Icon
};
export const AllIcons = () => {
const names = Object.keys(Icon);
2020-04-19 20:30:32 +02:00
const SelectedIcon = Icon[select('name', names, names[0])];
2020-04-19 20:30:32 +02:00
return (
<SelectedIcon />
2020-04-19 20:30:32 +02:00
);
};