mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 18:36:08 +00:00
Fix TypeScript Error for ButtonProps (#8101)
This commit is contained in:
parent
7aaaddf7cc
commit
ceb6e5b72d
@ -13,9 +13,8 @@
|
|||||||
|
|
||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
|
|
||||||
export interface Props {
|
export interface CommonProps {
|
||||||
block?: boolean;
|
block?: boolean;
|
||||||
children?: ReactNode;
|
|
||||||
className?: string;
|
className?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
size?: 'large' | 'regular' | 'small' | 'x-small' | 'custom';
|
size?: 'large' | 'regular' | 'small' | 'x-small' | 'custom';
|
||||||
@ -24,7 +23,7 @@ export interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ButtonAsButtonProps
|
export interface ButtonAsButtonProps
|
||||||
extends Props,
|
extends CommonProps,
|
||||||
React.ButtonHTMLAttributes<HTMLButtonElement> {
|
React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||||
/**
|
/**
|
||||||
* The element that should be rendered as a button
|
* The element that should be rendered as a button
|
||||||
@ -37,13 +36,13 @@ export interface ButtonAsButtonProps
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ButtonAsAnchorProps
|
export interface ButtonAsAnchorProps
|
||||||
extends Props,
|
extends CommonProps,
|
||||||
React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
||||||
tag?: 'a';
|
tag?: 'a';
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ButtonAsOtherProps
|
export interface ButtonAsOtherProps
|
||||||
extends Props,
|
extends CommonProps,
|
||||||
React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
||||||
tag?: string;
|
tag?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user