Skip to content

Commit

Permalink
fix meta
Browse files Browse the repository at this point in the history
  • Loading branch information
NgocNhi123 committed Aug 7, 2024
1 parent 2afc86e commit 2ac4f91
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/docs/checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@ import { Meta, StoryObj } from "@storybook/react";
import { useRef, useState } from "react";
import { Button, Checkbox } from "../core";
import { Book, someBooks } from "../old-docs/utils/example";
import { Utils } from "../old-docs/utils/utils";
import { docsMetaParameters } from "./utils/parameter";
import { docsMetaArgTypes } from "./utils/arg-type";

const meta: Meta = {
title: "Components/Checkbox",
component: Checkbox,
argTypes: {
checked: Utils.arg("boolean", "Visual"),
indeterminate: Utils.arg("boolean", "Visual"),
disabled: Utils.arg("boolean", "Visual"),
children: Utils.arg(null, "Controlled"),
setChecked: Utils.arg(null, "Controlled"),
defaultChecked: Utils.arg(null, "Uncontrolled"),
forwardedRef: Utils.arg(null, "Uncontrolled"),
},
parameters: docsMetaParameters({}),
argTypes: docsMetaArgTypes({
Visual: {
checked: "boolean",
indeterminate: "boolean",
disabled: "boolean",
},
Controlled: {
children: false,
setChecked: false,
},
Uncontrolled: {
defaultChecked: false,
forwardedRef: false,
},
}),
};

Utils.page.component(meta, { primary: "sticky", shots: [] });

export default meta;

export const Primary: StoryObj<typeof Checkbox> = {
Expand Down

0 comments on commit 2ac4f91

Please sign in to comment.