I followed Storybook tutorials and created select controls to add props to the Button component. For example:
export default {
title: 'Button',
component: Button,
argTypes: {
size: { control: "select", options: ["isSmall", "isLarge"] },
},
}
My code output in Storybook look like this:
<Button size="isSmall" />
I want my component to be like this:
<Button isSmall />
If "isLarge" is selected from dropdown it should output:
<Button isLarge />
Is there a way to do this without "size=" in the output? It can do this with boolean switch, but no luck with dropdown or radio buttons.