mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(slider): add fullWidth prop
This commit is contained in:
parent
35031e800c
commit
ecc4e521bb
1 changed files with 10 additions and 1 deletions
|
@ -35,6 +35,12 @@
|
|||
/** Set to `true` to hide the text input */
|
||||
export let hideTextInput = false;
|
||||
|
||||
/**
|
||||
* Set to `true` for the slider to span
|
||||
* the full width of its containing element.
|
||||
*/
|
||||
export let fullWidth = false;
|
||||
|
||||
/** Set an id for the slider div element */
|
||||
export let id = "ccs-" + Math.random().toString(36);
|
||||
|
||||
|
@ -143,7 +149,10 @@
|
|||
{labelText}
|
||||
</slot>
|
||||
</label>
|
||||
<div class:bx--slider-container="{true}">
|
||||
<div
|
||||
class:bx--slider-container="{true}"
|
||||
style="{fullWidth ? 'width: 100%' : undefined}"
|
||||
>
|
||||
<span class:bx--slider__range-label="{true}">{minLabel || min}</span>
|
||||
<div
|
||||
bind:this="{ref}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue