📝(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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user