From a941a8ac512e5e352bd035df1de966b42d6682d5 Mon Sep 17 00:00:00 2001 From: soupette Date: Wed, 1 Apr 2020 11:02:03 +0200 Subject: [PATCH] Improve Card Signed-off-by: soupette --- .../admin/src/components/Card/index.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/strapi-plugin-upload/admin/src/components/Card/index.js b/packages/strapi-plugin-upload/admin/src/components/Card/index.js index 3f2b51ecfb..7757c17275 100644 --- a/packages/strapi-plugin-upload/admin/src/components/Card/index.js +++ b/packages/strapi-plugin-upload/admin/src/components/Card/index.js @@ -51,13 +51,21 @@ const Card = ({ {children} - - {!withoutFileInfo && name}  - {!withoutFileInfo && } - - - {!withoutFileInfo && `${getExtension(fileType)} - ${fileSize}`} - + + {!withoutFileInfo ? ( + <> + + {name} + + + + {!withoutFileInfo && `${getExtension(fileType)} - ${fileSize}`} + + + ) : ( + + )} + {hasError && {errorMessage}} );