Skip to content

Commit

Permalink
fix(components): fix SwirlFileUploader label id
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqrrl committed Oct 5, 2023
1 parent c0bbfd7 commit 4837a48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/short-poets-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@getflip/swirl-components": patch
"@getflip/swirl-components-angular": patch
"@getflip/swirl-components-react": patch
---

Fix incorrect swirl-file-uploader label id
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("swirl-file-uploader", () => {
expect(page.root).toEqualHtml(`
<swirl-file-uploader accept="image/*" cta-label="CTA Label" description="Only image files are allowed." drag-drop-label="DragDropLabel" input-id="file-upload" input-name="file-upload" label="Label" multiple="true">
<div class="file-uploader file-uploader--show-dropzone">
<label class="file-uploader__label" htmlfor="file-upload" id="undefined-label">
<label class="file-uploader__label" htmlfor="file-upload" id="file-upload-label">
Label
</label>
<span class="file-uploader__description" id="file-upload-description">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class SwirlFileUploader implements SwirlFormInput<FileList> {
<label
class="file-uploader__label"
htmlFor={this.inputId}
id={`${this.inputEl}-label`}
id={`${this.inputId}-label`}
>
{this.label}
</label>
Expand Down

0 comments on commit 4837a48

Please sign in to comment.