Skip to content

Commit

Permalink
fix(file-uploader): do not render empty element if labelTitle, `lab…
Browse files Browse the repository at this point in the history
…elDescription` not provided (#1778)

Fixes #1775
  • Loading branch information
metonym authored Jul 23, 2023
1 parent baff07e commit 7ef8b73
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/FileUploader/FileUploader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,22 @@
on:mouseenter
on:mouseleave
>
<p
class:bx--file--label="{true}"
class:bx--label-description--disabled="{disabled}"
>
{labelTitle}
</p>
<p
class:bx--label-description="{true}"
class:bx--label-description--disabled="{disabled}"
>
{labelDescription}
</p>
{#if labelTitle}
<p
class:bx--file--label="{true}"
class:bx--label-description--disabled="{disabled}"
>
{labelTitle}
</p>
{/if}
{#if labelDescription}
<p
class:bx--label-description="{true}"
class:bx--label-description--disabled="{disabled}"
>
{labelDescription}
</p>
{/if}
<FileUploaderButton
disabled="{disabled}"
disableLabelChanges
Expand Down

0 comments on commit 7ef8b73

Please sign in to comment.