diff --git a/packages/sage-react/lib/UploadCard/UploadCard.jsx b/packages/sage-react/lib/UploadCard/UploadCard.jsx index 9f05e53eda..296d17f5a4 100644 --- a/packages/sage-react/lib/UploadCard/UploadCard.jsx +++ b/packages/sage-react/lib/UploadCard/UploadCard.jsx @@ -54,22 +54,23 @@ export const UploadCard = ({ ); const renderLabel = () => { - if ((selectionLabel || replaceLabel) && !customFileInputField) { - return ( - <> - - - ); - } - - if (actions) { - if (!customFileInputField) { - return ( - - ); + let classnames = 'visually-hidden'; + const CustomLabel = () => ( + <> + + + ); + if ((selectionLabel || replaceLabel) && customFileInputField === false) { + classnames = 'sage-upload-card__input-label sage-btn sage-btn--secondary'; + } else if (actions !== null) { + if (customFileInputField === false) { + classnames = 'visually-hidden'; } + return actions; } - return actions; + return ; }; return (