Add back in active prop to ActionButton which must have got lost in a merge
This commit is contained in:
parent
41fb234499
commit
1b90760c2e
|
@ -11,6 +11,7 @@
|
||||||
export let icon = ""
|
export let icon = ""
|
||||||
export let dataCy = null
|
export let dataCy = null
|
||||||
export let size = "M"
|
export let size = "M"
|
||||||
|
export let active = false
|
||||||
|
|
||||||
function longPress(element) {
|
function longPress(element) {
|
||||||
if (!longPressable) return
|
if (!longPressable) return
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
class:spectrum-ActionButton--emphasized={emphasized}
|
class:spectrum-ActionButton--emphasized={emphasized}
|
||||||
class:is-selected={selected}
|
class:is-selected={selected}
|
||||||
class="spectrum-ActionButton spectrum-ActionButton--size{size}"
|
class="spectrum-ActionButton spectrum-ActionButton--size{size}"
|
||||||
|
class:active
|
||||||
{disabled}
|
{disabled}
|
||||||
on:longPress
|
on:longPress
|
||||||
on:click|preventDefault
|
on:click|preventDefault
|
||||||
|
@ -67,3 +69,10 @@
|
||||||
<span class="spectrum-ActionButton-label"><slot /></span>
|
<span class="spectrum-ActionButton-label"><slot /></span>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.active,
|
||||||
|
.active svg {
|
||||||
|
color: var(--spectrum-global-color-blue-600);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue