Allow indeterminate booleans
This commit is contained in:
parent
7c39946584
commit
615d825817
|
@ -10,6 +10,7 @@
|
|||
export let validate = null
|
||||
export let compress = false
|
||||
export let lighter = false
|
||||
export let indeterminate = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -34,7 +35,7 @@
|
|||
on:click={onChange}
|
||||
>
|
||||
<span>
|
||||
<Checkbox {disabled} {value} />
|
||||
<Checkbox {disabled} {value} {indeterminate} />
|
||||
</span>
|
||||
<div class="text">
|
||||
{#if text}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
export let text = null
|
||||
export let disabled = false
|
||||
export let size
|
||||
export let indeterminate = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const onChange = event => {
|
||||
|
@ -19,7 +20,9 @@
|
|||
</script>
|
||||
|
||||
<label
|
||||
class="spectrum-Checkbox spectrum-Checkbox--emphasized {sizeClass}"
|
||||
class="spectrum-Checkbox spectrum-Checkbox--emphasized {sizeClass} {indeterminate
|
||||
? 'is-indeterminate'
|
||||
: ''}"
|
||||
class:is-invalid={!!error}
|
||||
class:checked={value}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue