ohif-viewer/platform/ui/src/components/IconButton/IconButton.stories.tsx
Alireza f9449e97df
fix: storybook with typescript (#2926)
* fix storybook for typescript

* fix babel
2022-09-13 08:57:22 -04:00

27 lines
530 B
TypeScript

import React from 'react';
import IconButton from './IconButton';
import Icon from '../Icon/Icon';
import { ICONS } from '../Icon/getIcon';
export default {
component: IconButton,
title: 'Icons/IconButton',
argTypes: {
iconName: {
control: { type: 'select', options: Object.keys(ICONS) },
},
},
};
const Template = ({ iconName, ...args }) => (
<IconButton {...args}>
<Icon name={iconName} />
</IconButton>
);
export const Default = Template.bind({});
Default.args = {
iconName: 'clipboard',
};