Skip to content

Commit

Permalink
feat: checkbox prop table 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Nov 27, 2024
1 parent e42d642 commit a292c44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/content/docs/react/components/checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ title: Checkbox

<Installation name="checkbox" />

## Props

<AutoTypeTable path="./registry/ui/checkbox.tsx" name="CheckboxProps" />

### Size

<ComponentExample name="checkbox-size" />
Expand Down
13 changes: 9 additions & 4 deletions docs/registry/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ const visuallyHidden: CSSProperties = {
width: "1px",
};

export interface CheckboxProps
extends Assign<React.HTMLAttributes<HTMLInputElement>, UseCheckboxProps>,
CheckboxVariantProps {
export interface CheckboxProps extends CheckboxVariantProps {
label: React.ReactNode;
}

export const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
interface ReactCheckboxProps
extends Omit<
Assign<React.InputHTMLAttributes<HTMLInputElement>, UseCheckboxProps>,
"size"
>,
CheckboxProps {}

export const Checkbox = React.forwardRef<HTMLInputElement, ReactCheckboxProps>(
(
{
className,
Expand Down

0 comments on commit a292c44

Please sign in to comment.