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

19 lines
349 B
React
Raw Normal View History

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