File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- import React , { useMemo , Ref } from "react" ;
1+ import React , { useMemo , Ref , type HTMLAttributes } from "react" ;
22import { createDecorators } from "@next-core/element" ;
33import {
44 ReactNextElement ,
@@ -37,7 +37,7 @@ if (false) {
3737export interface ButtonProps {
3838 type ?: ButtonType ;
3939 size ?: ComponentSize ;
40- icon ?: GeneralIconProps ;
40+ icon ?: GeneralIconProps & HTMLAttributes < GeneralIcon > ;
4141 shape ?: Shape ;
4242 danger ?: boolean ;
4343 disabled ?: boolean ;
@@ -89,7 +89,7 @@ class Button extends ReactNextElement implements ButtonProps {
8989 @property ( {
9090 attribute : false ,
9191 } )
92- accessor icon : GeneralIconProps | undefined ;
92+ accessor icon : ( GeneralIconProps & HTMLAttributes < GeneralIcon > ) | undefined ;
9393
9494 /**
9595 * 按钮形状,支持圆形、椭圆形,不设置为默认方形
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import React, {
44 useMemo ,
55 useRef ,
66 useState ,
7+ type HTMLAttributes ,
78} from "react" ;
89import { createDecorators } from "@next-core/element" ;
910import { ReactNextElement , wrapBrick } from "@next-core/react-element" ;
@@ -37,7 +38,7 @@ export interface LinkProps {
3738 url ?: ExtendedLocationDescriptor ;
3839 href ?: string ;
3940 inApp ?: boolean ;
40- icon ?: GeneralIconProps ;
41+ icon ?: GeneralIconProps & HTMLAttributes < GeneralIcon > ;
4142 target ?: Target ;
4243 showExternalIcon ?: boolean ;
4344 underline ?: boolean ;
@@ -129,7 +130,7 @@ class Link extends ReactNextElement implements LinkProps {
129130 @property ( {
130131 attribute : false ,
131132 } )
132- accessor icon : GeneralIconProps | undefined ;
133+ accessor icon : ( GeneralIconProps & HTMLAttributes < GeneralIcon > ) | undefined ;
133134
134135 /**
135136 * 是否开启危险状态
You can’t perform that action at this time.
0 commit comments