mirror of
https://github.com/zhigang1992/react.git
synced 2026-03-26 06:55:07 +08:00
fix: override types
This commit is contained in:
@@ -17,7 +17,8 @@ const defaultProps = {
|
||||
className: '',
|
||||
}
|
||||
|
||||
export type CodeProps = Props & typeof defaultProps & React.HTMLAttributes<any>
|
||||
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>
|
||||
export type CodeProps = Props & typeof defaultProps & NativeAttrs
|
||||
|
||||
const Code: React.FC<React.PropsWithChildren<CodeProps>> = React.memo(({
|
||||
children, block, bash, darkBash, className, width, ...props
|
||||
|
||||
Reference in New Issue
Block a user