diff --git a/lib/component/button/Button.tsx b/lib/component/button/Button.tsx index 3cc0e04..4645813 100644 --- a/lib/component/button/Button.tsx +++ b/lib/component/button/Button.tsx @@ -1,44 +1,31 @@ - - import type { ButtonProps } from "$/types/ButtonTypes"; import clsx from "clsx"; -import * as React from "react"; +import { forwardRef } from "react"; -const Button = React.forwardRef( - ( - { - className, - rounding = "lg", - shape = "rectangle", - size = "md", - variant = "standard", - disabled, - ariaLabel, - ariaDescribedBy, - ariaControls, - role, - tabIndex, - children, - onClick, - ...buttonProps - }, - ref - ) => { +const Button = forwardRef(( +{ + className, + type="button", + rounding = "lg", + shape = "rectangle", + size = "md", + variant = "standard", + disabled, + ...buttonProps +}, ref ) => { return ( + /> ); } ); diff --git a/lib/types/ButtonTypes.ts b/lib/types/ButtonTypes.ts index 051a56a..96ba797 100644 --- a/lib/types/ButtonTypes.ts +++ b/lib/types/ButtonTypes.ts @@ -1,4 +1,4 @@ -import type { ButtonHTMLAttributes, Ref } from "react"; +import type { ButtonHTMLAttributes } from "react"; export type ButtonRounding = "none" | "sm" | "md" | "lg" | "full"; @@ -8,15 +8,9 @@ export type ButtonVariant = "standard" | "outline" | "ghost" | "outline-ghost" | export interface ButtonProps extends Omit, "size" | "type"> { + type?: "button" | "submit" | "reset"; rounding?: ButtonRounding; shape?: ButtonShape; size?: ButtonSize; variant?: ButtonVariant; - ref?: Ref; - - ariaLabel?: string; - ariaDescribedBy?: string; - ariaControls?: string; - role?: string; - tabIndex?: number; }