fix: make checkbox story documentation easier (#4208)

This commit is contained in:
Andreas Coroiu 2022-12-12 15:16:15 +01:00 committed by GitHub
parent 54a4b4690b
commit bdfc2b0839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 5 deletions

View File

@ -43,7 +43,6 @@ class ExampleComponent {
export default {
title: "Component Library/Form/Checkbox",
component: ExampleComponent,
decorators: [
moduleMetadata({
declarations: [ExampleComponent],
@ -68,10 +67,6 @@ export default {
url: "https://www.figma.com/file/Zt3YSeb6E6lebAffrNLa0h/Tailwind-Component-Library?node-id=3930%3A16850&t=xXPx6GJYsJfuMQPE-4",
},
},
args: {
checked: false,
disabled: false,
},
} as Meta;
const DefaultTemplate: Story<ExampleComponent> = (args: ExampleComponent) => ({
@ -80,6 +75,17 @@ const DefaultTemplate: Story<ExampleComponent> = (args: ExampleComponent) => ({
});
export const Default = DefaultTemplate.bind({});
Default.parameters = {
docs: {
source: {
code: template,
},
},
};
Default.args = {
checked: false,
disabled: false,
};
const CustomTemplate: Story = (args) => ({
props: args,
@ -100,5 +106,6 @@ const CustomTemplate: Story = (args) => ({
</div>
`,
});
CustomTemplate.args = {};
export const Custom = CustomTemplate.bind({});