mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat: make titleText
slottable in MultiSelect
, ComboBox
(#1750)
Closes #1747
This commit is contained in:
parent
e2d7e04397
commit
0b4f19c87e
6 changed files with 22 additions and 4 deletions
|
@ -218,13 +218,15 @@
|
|||
/>
|
||||
|
||||
<div class:bx--list-box__wrapper="{true}">
|
||||
{#if titleText}
|
||||
{#if titleText || $$slots.titleText}
|
||||
<label
|
||||
for="{id}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
>
|
||||
<slot name="titleText">
|
||||
{titleText}
|
||||
</slot>
|
||||
</label>
|
||||
{/if}
|
||||
<ListBox
|
||||
|
|
|
@ -293,14 +293,16 @@
|
|||
class:bx--list-box__wrapper--inline="{inline}"
|
||||
class:bx--multi-select__wrapper--inline--invalid="{inline && invalid}"
|
||||
>
|
||||
{#if titleText}
|
||||
{#if titleText || $$slots.titleText}
|
||||
<label
|
||||
for="{id}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
class:bx--visually-hidden="{hideLabel}"
|
||||
>
|
||||
<slot name="titleText">
|
||||
{titleText}
|
||||
</slot>
|
||||
</label>
|
||||
{/if}
|
||||
<ListBox
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue