I'm trying to better understand when to use args vs when to use argTypes? What are the differences?
From what I read it seems that argTypes is just an expansion of args and allows for better functionality an documentations. But is there more?
In the case below, we have can update the 'label' within the storybook UI whether its argTypes or args.
** Adding Minimal Reproducible Example **
// Button.stories.js
export default {
title: 'Button',
argTypes: {
label: { control: 'text' },
},
};
export const Basic = (args) => <Button {...args} />;
Basic.args = {
label: '',
};