-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from tuzkituan/main
Version 1.1.7
- Loading branch information
Showing
30 changed files
with
9,824 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# ZENI-UI | ||
I just want to create my own UI library, that's all. | ||
|
||
[![npm](https://img.shields.io/npm/v/zeni-ui)](https://www.npmjs.com/package/zeni-ui) | ||
[![npm](https://img.shields.io/npm/dm/zeni-ui)](https://www.npmjs.com/package/zeni-ui) | ||
|
||
### Storybook | ||
https://tuzkituan.github.io/zeni-ui/ | ||
|
||
I just want to create my own UI library, that's all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { ICheckboxGroup } from "./Checkbox.types"; | ||
import { Checkbox, CheckboxGroup } from "./Checkbox"; | ||
|
||
const meta = { | ||
title: "FORMS/Checkbox/CheckboxGroup", | ||
component: CheckboxGroup, | ||
tags: ["autodocs"], | ||
argTypes: { | ||
layout: { | ||
options: ["horizontal", "vertical"], | ||
control: { type: "radio" }, | ||
}, | ||
defaultValue: { | ||
control: { type: "text" }, | ||
}, | ||
spacing: { | ||
control: { type: "number" }, | ||
}, | ||
value: { | ||
control: { type: "text" }, | ||
}, | ||
onChange: { | ||
action: "onChange", | ||
}, | ||
}, | ||
} satisfies Meta<typeof CheckboxGroup>; | ||
|
||
export default meta; | ||
type Story = StoryObj<ICheckboxGroup>; | ||
|
||
const radioGroupArgs: ICheckboxGroup = { | ||
value: ["1"], | ||
layout: "horizontal", | ||
onChange: (val) => console.log("checked: ", val), | ||
}; | ||
|
||
export const Primary: Story = (props: ICheckboxGroup) => { | ||
const all = { ...radioGroupArgs, ...props }; | ||
return ( | ||
<CheckboxGroup {...all}> | ||
<Checkbox value="1">Option A</Checkbox> | ||
<Checkbox value="2">Option B</Checkbox> | ||
<Checkbox value="3">Option C</Checkbox> | ||
</CheckboxGroup> | ||
); | ||
}; | ||
|
||
Primary.args = radioGroupArgs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.