📝(react) make color prop of Button appear in the doc

This prop color was not appearing in the ArgTypes because it was an override
attribute.

Fixes #235
This commit is contained in:
Nathan Vasse
2024-02-28 14:34:05 +01:00
committed by NathanVss
parent ce7a3d7c5b
commit c5e5d9fa85

View File

@@ -6,8 +6,11 @@ import React, {
ReactNode, ReactNode,
} from "react"; } from "react";
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & type DomProps = ButtonHTMLAttributes<HTMLButtonElement> &
AnchorHTMLAttributes<HTMLAnchorElement> & { AnchorHTMLAttributes<HTMLAnchorElement>;
export type ButtonProps = Omit<DomProps, "color"> & {
size?: "medium" | "small" | "nano";
color?: color?:
| "primary" | "primary"
| "primary-text" | "primary-text"
@@ -15,7 +18,6 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &
| "tertiary" | "tertiary"
| "tertiary-text" | "tertiary-text"
| "danger"; | "danger";
size?: "medium" | "small" | "nano";
icon?: ReactNode; icon?: ReactNode;
iconPosition?: "left" | "right"; iconPosition?: "left" | "right";
active?: boolean; active?: boolean;