diff --git a/packages/ds-react-core/src/ui/Button/Button.tsx b/packages/ds-react-core/src/ui/Button/Button.tsx index 2165cc87..f496a59c 100644 --- a/packages/ds-react-core/src/ui/Button/Button.tsx +++ b/packages/ds-react-core/src/ui/Button/Button.tsx @@ -1,34 +1,6 @@ -import type React from "react"; - +import type Props from "./types.js"; import "./styles.css"; -// TODO: this is how appearance could work as enum -// -// export enum ButtonAppearance { -// DEFAULT = "default", -// BASE = "base", -// POSITIVE = "positive", -// NEGATIVE = "negative", -// LINK = "link", -// } - -export interface ButtonProps { - /* A unique identifier for the button */ - id?: string; - /** Additional CSS classes */ - className?: string; - /** The visual style of the button */ - appearance?: "neutral" | "base" | "positive" | "negative" | "link"; - /** Button contents */ - label: string; - /** Optional click handler */ - onClick?: () => void; -} - -// combine custom props with all native button element attributes -export type ButtonPropsType = ButtonProps & - React.ButtonHTMLAttributes; - /** Buttons are clickable elements used to perform an action. */ const Button = ({ id, @@ -36,7 +8,7 @@ const Button = ({ appearance, label, ...props -}: ButtonPropsType): React.ReactElement => { +}: Props): React.ReactElement => { return (