diff --git a/package.json b/package.json index 704b4d1..e29e981 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "publishConfig": { "registry": "https://npm.pkg.github.com" }, - "version": "0.0.8", + "version": "0.0.9", "description": "system.css theme wrapped for React", "type": "module", "main": "dist/index.cjs.js", diff --git a/src/button/Button.tsx b/src/button/Button.tsx index a589fe7..02ee89b 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -1,7 +1,7 @@ import React from "react"; import styles from "../styles"; -export type ButtonProps = React.ComponentProps<"button"> & { +export type ButtonProps = Omit, "className"> & { primary?: boolean; }; diff --git a/src/checkbox/CheckBox.tsx b/src/checkbox/CheckBox.tsx new file mode 100644 index 0000000..0623d4a --- /dev/null +++ b/src/checkbox/CheckBox.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import "@sakun/system.css"; + +export type CheckBoxProps = Omit, "type"> & { + label: string; +}; + +const CheckBox: React.FC = (props) => { + return ( +
+ + +
+ ); +}; + +export default CheckBox; diff --git a/src/checkbox/__docs__/CheckBox.stories.tsx b/src/checkbox/__docs__/CheckBox.stories.tsx new file mode 100644 index 0000000..1837120 --- /dev/null +++ b/src/checkbox/__docs__/CheckBox.stories.tsx @@ -0,0 +1,14 @@ +import type { Meta, StoryObj } from "@storybook/react"; +import Example from "./Example"; + +const meta: Meta = { + title: "CheckBox", + component: Example, +}; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: {}, +}; diff --git a/src/checkbox/__docs__/Example.tsx b/src/checkbox/__docs__/Example.tsx new file mode 100644 index 0000000..da5f639 --- /dev/null +++ b/src/checkbox/__docs__/Example.tsx @@ -0,0 +1,26 @@ +import React, { FC } from "react"; +import CheckBox from ".."; + +export type ExampleProps = {}; + +const Example: FC = ({}) => { + return ( +
+
+ + + + +
+ ); +}; + +export default Example; diff --git a/src/checkbox/index.ts b/src/checkbox/index.ts new file mode 100644 index 0000000..406a410 --- /dev/null +++ b/src/checkbox/index.ts @@ -0,0 +1,4 @@ +import CheckBox from "./CheckBox"; +export type { CheckBoxProps } from "./CheckBox"; + +export default CheckBox; diff --git a/src/textbox/TextBox.tsx b/src/textbox/TextBox.tsx index 15ca68b..0a4c64d 100644 --- a/src/textbox/TextBox.tsx +++ b/src/textbox/TextBox.tsx @@ -1,7 +1,7 @@ import React from "react"; import "@sakun/system.css"; -export type TextBoxProps = React.ComponentProps<"input"> & { +export type TextBoxProps = Omit, "type"> & { label: string; };