diff --git a/src/packages/checkbox/__test__/__snapshots__/checkbox.spec.tsx.snap b/src/packages/checkbox/__test__/__snapshots__/checkbox.spec.tsx.snap index b6a4fe4c13..a1626f034c 100644 --- a/src/packages/checkbox/__test__/__snapshots__/checkbox.spec.tsx.snap +++ b/src/packages/checkbox/__test__/__snapshots__/checkbox.spec.tsx.snap @@ -6,7 +6,7 @@ exports[`should match snapshot 1`] = ` class="nut-checkbox nut-checkbox-reverse" >
{ if (innerDisabled) { if (innerIndeterminate) { - return + return ( + + + + ) } if (innerChecked) { - return + return ( + + + + ) } - return + return ( + + + + ) } if (!innerChecked) { return React.isValidElement(icon) ? ( icon ) : ( - + + + ) } if (innerIndeterminate) { return React.isValidElement(indeterminateIcon) ? ( indeterminateIcon ) : ( - + + + ) } return React.isValidElement(activeIcon) ? ( activeIcon ) : ( - + ) @@ -129,13 +145,13 @@ export const Checkbox: FC< } const renderLabel = () => { return ( - {children || label} - + ) } @@ -178,7 +194,7 @@ export const Checkbox: FC< const renderCheckboxItem = () => { if (ctx?.list) { - return <>{renderListItem()} + return renderListItem() } if (shape === 'button') { return renderButton() diff --git a/src/packages/checkbox/checkbox.tsx b/src/packages/checkbox/checkbox.tsx index d80018cbcb..d931828e2c 100644 --- a/src/packages/checkbox/checkbox.tsx +++ b/src/packages/checkbox/checkbox.tsx @@ -108,7 +108,7 @@ export const Checkbox: FunctionComponent< return React.isValidElement(activeIcon) ? ( activeIcon ) : ( -
+
)