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:
@@ -21,7 +21,8 @@ const defaultProps = {
|
||||
className: '',
|
||||
}
|
||||
|
||||
export type ButtonDropdownItemProps = Props & typeof defaultProps & React.ButtonHTMLAttributes<any>
|
||||
type NativeAttrs = Omit<React.ButtonHTMLAttributes<any>, keyof Props>
|
||||
export type ButtonDropdownItemProps = Props & typeof defaultProps & NativeAttrs
|
||||
|
||||
const ButtonDropdownItem: React.FC<React.PropsWithChildren<ButtonDropdownItemProps>> = React.memo(({
|
||||
children, onClick, className, main, type: selfType, ...props
|
||||
|
||||
@@ -27,7 +27,8 @@ const defaultProps = {
|
||||
className: '',
|
||||
}
|
||||
|
||||
export type ButtonDropdownProps = Props & typeof defaultProps & React.HTMLAttributes<any>
|
||||
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>
|
||||
export type ButtonDropdownProps = Props & typeof defaultProps & NativeAttrs
|
||||
|
||||
const stopPropagation = (event: MouseEvent<HTMLElement>) => {
|
||||
event.stopPropagation()
|
||||
|
||||
Reference in New Issue
Block a user