Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thirty-kangaroos-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/ui-react': patch
---

fix: Swap the upload button with the clear all button.
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ exports[`UploadPreviewer renders as expected 1`] = `
class="amplify-fileuploader__previewer__footer__actions"
>
<button
class="amplify-button amplify-field-group__control amplify-button--primary amplify-button--small"
class="amplify-button amplify-field-group__control amplify-button--link amplify-button--small"
data-fullwidth="false"
data-size="small"
data-variation="primary"
data-variation="link"
type="button"
>
Upload 1 file
Clear all
</button>
<button
class="amplify-button amplify-field-group__control amplify-button--link amplify-button--small"
class="amplify-button amplify-field-group__control amplify-button--primary amplify-button--small"
data-fullwidth="false"
data-size="small"
data-variation="link"
data-variation="primary"
type="button"
>
Clear all
Upload 1 file
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export function UploadPreviewer({
<View className={ComponentClassName.FileUploaderPreviewerFooterActions}>
{!isLoading && !isSuccessful && (
<>
<Button size="small" variation="link" onClick={onClear}>
{translate('Clear all')}
</Button>
<Button
disabled={isDisabled}
size="small"
Expand All @@ -86,10 +89,6 @@ export function UploadPreviewer({
>
{`${translate('Upload')} ${remainingFilesText}`}
</Button>

<Button size="small" variation="link" onClick={onClear}>
{translate('Clear all')}
</Button>
</>
)}
{isSuccessful && (
Expand Down