diff --git a/packages/react/src/docs/components/Checkbox.mdx b/packages/react/src/docs/components/Checkbox.mdx index 1401658..4712f18 100644 --- a/packages/react/src/docs/components/Checkbox.mdx +++ b/packages/react/src/docs/components/Checkbox.mdx @@ -4,6 +4,8 @@ import { Checkbox } from "@components/Checkbox"; import { TabProvider, TabTrigger, TabContent, TabList } from "@components/Tabs"; import { Story } from "@/components/Story"; import { LoadedCode } from "@/components/LoadedCode"; +import { CheckboxDemo } from "./CheckboxBlocks/Preview"; +import Examples from "./CheckboxBlocks/Examples"; # Checkbox A control that allows the user to toggle between checked and not checked. @@ -15,26 +17,11 @@ A control that allows the user to toggle between checked and not checked. - - - Checkbox - + - ```tsx - import { Label } from "@components/Label"; - import { Checkbox } from "@components/Checkbox"; - - export function CheckboxExample() { - return ( - - - Checkbox - - ); - } - ``` + @@ -43,7 +30,7 @@ A control that allows the user to toggle between checked and not checked. 1. Create a new file `Checkbox.mdx` in your component folder. 2. Copy and paste the following code into the file. - + ## Usage @@ -74,26 +61,11 @@ import { Checkbox } from "@components/Checkbox"; - - - Agree terms and conditions - + - ```tsx - import { Label } from "@components/Label"; - import { Checkbox } from "@components/Checkbox"; - - export function CheckboxExample() { - return ( - - - Agree terms and conditions - - ); - } - ``` + @@ -106,26 +78,10 @@ import { Checkbox } from "@components/Checkbox"; - - - Agree terms and conditions - + - ```tsx - import { Label } from "@components/Label"; - import { Checkbox } from "@components/Checkbox"; - - export function CheckboxExample() { - return ( - - - Agree terms and conditions - - ); - } - ``` + - diff --git a/packages/react/src/docs/components/CheckboxBlocks/Examples/Disabled.tsx b/packages/react/src/docs/components/CheckboxBlocks/Examples/Disabled.tsx new file mode 100644 index 0000000..470be3c --- /dev/null +++ b/packages/react/src/docs/components/CheckboxBlocks/Examples/Disabled.tsx @@ -0,0 +1,11 @@ +import { Label } from "@components/Label"; +import { Checkbox } from "@components/Checkbox"; + +export function Disabled() { + return ( + + + Agree terms and conditions + + ); +} diff --git a/packages/react/src/docs/components/CheckboxBlocks/Examples/Text.tsx b/packages/react/src/docs/components/CheckboxBlocks/Examples/Text.tsx new file mode 100644 index 0000000..6c19dd0 --- /dev/null +++ b/packages/react/src/docs/components/CheckboxBlocks/Examples/Text.tsx @@ -0,0 +1,11 @@ +import { Label } from "@components/Label"; +import { Checkbox } from "@components/Checkbox"; + +export function Text() { + return ( + + + Agree terms and conditions + + ); +} diff --git a/packages/react/src/docs/components/CheckboxBlocks/Examples/index.ts b/packages/react/src/docs/components/CheckboxBlocks/Examples/index.ts new file mode 100644 index 0000000..8b86020 --- /dev/null +++ b/packages/react/src/docs/components/CheckboxBlocks/Examples/index.ts @@ -0,0 +1,5 @@ +import { Text } from "./Text"; +import { Disabled } from "./Disabled"; + +export default { Text, Disabled }; + diff --git a/packages/react/src/docs/components/CheckboxBlocks/Preview.tsx b/packages/react/src/docs/components/CheckboxBlocks/Preview.tsx new file mode 100644 index 0000000..8f83020 --- /dev/null +++ b/packages/react/src/docs/components/CheckboxBlocks/Preview.tsx @@ -0,0 +1,11 @@ +import { Checkbox } from "@components/Checkbox"; +import { Label } from "@components/Label"; + +export function CheckboxDemo() { + return ( + + + Checkbox + + ); +}
Agree terms and conditions