import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import Button, { Props } from 'components/Button';
export default {
title: 'UI/Button',
component: Button,
argTypes: {},
} as ComponentMeta<typeof Button>;
const Template: ComponentStory<typeof Button> = ({
onClick,
children,
}: Props) => <Button onClick={onClick}>{children}</Button>;
export const Primary = Template.bind({});
Primary.args = {
children: 'Button',
};
I don't really understand what ComponentMeta<typeof Button> really add , and also ComponentStory<typeof Button> , when you don't add it typescript just highlight that .args doesn't exist on Template . And also , typeof Button it just a function . Can it be written better or easier , or can I skip it, it looks strange , like boilerplate ?

