Set a condition for showing legend in FormGroup

We shouldn't add a <legend> If the the legend text specified.
This commit is contained in:
Bilux 2021-08-11 12:09:30 +01:00 committed by GitHub
commit 78468e2b29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,10 +30,12 @@
on:mouseenter
on:mouseleave
>
{#if legendText}
<legend
class:bx--label="{true}"
id="{legendId || $$restProps['aria-labelledby']}">{legendText}</legend
>
{/if}
<slot />
{#if message}
<div class:bx--form__requirement="{true}">{messageText}</div>