mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 04:35:32 +08:00
fix: override types
This commit is contained in:
@@ -31,7 +31,8 @@ const defaultProps = {
|
||||
className: '',
|
||||
}
|
||||
|
||||
export type ButtonProps = React.ButtonHTMLAttributes<any> & Props & typeof defaultProps
|
||||
type NativeAttrs = Omit<React.ButtonHTMLAttributes<any>, keyof Props>
|
||||
export type ButtonProps = Props & typeof defaultProps & NativeAttrs
|
||||
|
||||
const Button: React.FC<React.PropsWithChildren<ButtonProps>> = React.memo(({
|
||||
children, disabled, type, loading, shadow, ghost, effect, onClick,
|
||||
|
||||
Reference in New Issue
Block a user