mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
fix: make checkbox story documentation easier (#4208)
This commit is contained in:
@@ -43,7 +43,6 @@ class ExampleComponent {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: "Component Library/Form/Checkbox",
|
title: "Component Library/Form/Checkbox",
|
||||||
component: ExampleComponent,
|
|
||||||
decorators: [
|
decorators: [
|
||||||
moduleMetadata({
|
moduleMetadata({
|
||||||
declarations: [ExampleComponent],
|
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",
|
url: "https://www.figma.com/file/Zt3YSeb6E6lebAffrNLa0h/Tailwind-Component-Library?node-id=3930%3A16850&t=xXPx6GJYsJfuMQPE-4",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
args: {
|
|
||||||
checked: false,
|
|
||||||
disabled: false,
|
|
||||||
},
|
|
||||||
} as Meta;
|
} as Meta;
|
||||||
|
|
||||||
const DefaultTemplate: Story<ExampleComponent> = (args: ExampleComponent) => ({
|
const DefaultTemplate: Story<ExampleComponent> = (args: ExampleComponent) => ({
|
||||||
@@ -80,6 +75,17 @@ const DefaultTemplate: Story<ExampleComponent> = (args: ExampleComponent) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const Default = DefaultTemplate.bind({});
|
export const Default = DefaultTemplate.bind({});
|
||||||
|
Default.parameters = {
|
||||||
|
docs: {
|
||||||
|
source: {
|
||||||
|
code: template,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
Default.args = {
|
||||||
|
checked: false,
|
||||||
|
disabled: false,
|
||||||
|
};
|
||||||
|
|
||||||
const CustomTemplate: Story = (args) => ({
|
const CustomTemplate: Story = (args) => ({
|
||||||
props: args,
|
props: args,
|
||||||
@@ -100,5 +106,6 @@ const CustomTemplate: Story = (args) => ({
|
|||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
CustomTemplate.args = {};
|
||||||
|
|
||||||
export const Custom = CustomTemplate.bind({});
|
export const Custom = CustomTemplate.bind({});
|
||||||
|
|||||||
Reference in New Issue
Block a user