fix(label-text): correctly render "labelText" slots (#949)

Fixes #944
This commit is contained in:
Eric Liu 2021-12-28 12:59:33 -08:00 committed by GitHub
commit a32bcbccd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -82,7 +82,7 @@
class:bx--date-picker-container="{true}"
class:bx--date-picker--nolabel="{!labelText}"
>
{#if labelText}
{#if labelText || $$slots.labelText}
<label
for="{id}"
class:bx--label="{true}"

View file

@ -57,7 +57,7 @@
on:mouseleave
class:bx--form-item="{true}"
>
{#if labelText && !hideLabel}
{#if (labelText || $$slots.labelText) && !hideLabel}
<label
for="{id}"
class:bx--label="{true}"

View file

@ -74,7 +74,7 @@
class:bx--select--light="{light}"
>
<div class:bx--time-picker__input="{true}">
{#if labelText}
{#if labelText || $$slots.labelText}
<label
for="{id}"
class:bx--label="{true}"

View file

@ -54,7 +54,7 @@
on:mouseenter
on:mouseleave
>
{#if labelText}
{#if labelText || $$slots.labelText}
<label
for="{id}"
class:bx--label="{true}"

View file

@ -36,7 +36,7 @@
class:bx--toggle__label="{true}"
class:bx--skeleton="{true}"
>
{#if labelText}
{#if labelText || $$slots.labelText}
<span class:bx--toggle__label-text="{true}">
<slot name="labelText">
{labelText}