diff --git a/src/card/Card.tsx b/src/card/Card.tsx index 1f34ed579e..2f5aa6519b 100644 --- a/src/card/Card.tsx +++ b/src/card/Card.tsx @@ -133,20 +133,24 @@ const Card = forwardRef((props, ref) => { ); const card = ( -
+ <> {showHeader ? renderHeader() : null} {renderCover} {renderChildren} {renderFooter} -
+ ); - return loading ? ( - - {card} - - ) : ( - React.cloneElement(card, { style }) + return ( +
+ {React.isValidElement(loading) ? ( + React.cloneElement(loading, null, card) + ) : ( + + {card} + + )} +
); });