mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(slider): add hideLabel
prop (#1777)
Closes #1682 Co-authored-by: siaikin <abc1310054026@outlook.com>
This commit is contained in:
parent
ad711cdb38
commit
baff07e012
5 changed files with 54 additions and 23 deletions
|
@ -47,9 +47,15 @@
|
|||
/** Set to `true` to indicate an invalid state */
|
||||
export let invalid = false;
|
||||
|
||||
/** Specify the label text */
|
||||
/**
|
||||
* Specify the label text.
|
||||
* Alternatively, use the "labelText" slot (e.g., <span slot="labelText">...</span>)
|
||||
*/
|
||||
export let labelText = "";
|
||||
|
||||
/** Set to `true` to visually hide the label text */
|
||||
export let hideLabel = false;
|
||||
|
||||
/** Set a name for the slider element */
|
||||
export let name = "";
|
||||
|
||||
|
@ -145,6 +151,7 @@
|
|||
id="{labelId}"
|
||||
class:bx--label="{true}"
|
||||
class:bx--label--disabled="{disabled}"
|
||||
class:bx--visually-hidden="{hideLabel}"
|
||||
>
|
||||
<slot name="labelText">
|
||||
{labelText}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue