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

19 lines
349 B
React
Raw Normal View History

2020-04-19 18:30:32 +00:00
import React from 'react';
import { select } from '@storybook/addon-knobs';
2020-05-26 20:17:24 +00:00
import * as icons from './icons';
2020-04-19 18:30:32 +00:00
export default {
2020-05-11 20:28:18 +00:00
title: 'Common/Icons',
2020-05-26 20:17:24 +00:00
component: icons
2020-04-19 18:30:32 +00:00
};
export const AllIcons = () => {
2020-05-26 20:17:24 +00:00
const names = Object.keys(icons);
2020-04-19 18:30:32 +00:00
2020-05-26 20:17:24 +00:00
const SelectedIcon = icons[select('name', names, names[0])];
2020-04-19 18:30:32 +00:00
return (
<SelectedIcon />
2020-04-19 18:30:32 +00:00
);
};