diff --git a/components/tag/CheckableTag.tsx b/components/tag/CheckableTag.tsx index 516074ec4d..b806786c65 100644 --- a/components/tag/CheckableTag.tsx +++ b/components/tag/CheckableTag.tsx @@ -18,14 +18,15 @@ export interface CheckableTagProps { onClick?: (e: React.MouseEvent) => void; } -const CheckableTag: React.FC = ({ - prefixCls: customizePrefixCls, - className, - checked, - onChange, - onClick, - ...restProps -}) => { +const CheckableTag: React.FC = (props) => { + const { + prefixCls: customizePrefixCls, + className, + checked, + onChange, + onClick, + ...restProps + } = props; const { getPrefixCls } = React.useContext(ConfigContext); const handleClick = (e: React.MouseEvent) => { diff --git a/components/tag/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/tag/__tests__/__snapshots__/demo-extend.test.ts.snap index d0ba406dc0..677ef14d73 100644 --- a/components/tag/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/tag/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -221,6 +221,426 @@ exports[`renders components/tag/demo/basic.tsx extend context correctly 1`] = ` `; +exports[`renders components/tag/demo/borderless.tsx extend context correctly 1`] = ` +Array [ +
+
+ + Tag 1 + +
+
+ + Tag 2 + +
+
+ + Tag 3 + + + + +
+
+ + Tag 4 + + + + +
+
, +