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';
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',
component: Icons
2020-04-19 20:30:32 +02:00
};
export const AllIcons = () => {
2020-05-11 22:28:18 +02:00
const names = Object.keys(Icons);
2020-04-19 20:30:32 +02:00
2020-05-11 22:28:18 +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
);
};