mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 18:47:43 +01:00
fix(dev): resets Absolute Stroke Width (#3005)
* Changed resetStyle to reflect changes of button on absolutestrokewidth * removed nextTick --------- Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
This commit is contained in:
@@ -3,11 +3,13 @@
|
|||||||
import { Switch } from '@headlessui/vue'
|
import { Switch } from '@headlessui/vue'
|
||||||
|
|
||||||
const enabled = ref(false)
|
const enabled = ref(false)
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Switch
|
<Switch
|
||||||
v-model="enabled"
|
v-model="enabled"
|
||||||
|
:key="enabled"
|
||||||
class="switch"
|
class="switch"
|
||||||
:class="{ enabled }"
|
:class="{ enabled }"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -48,10 +48,12 @@ function resetStyle () {
|
|||||||
color.value = 'currentColor'
|
color.value = 'currentColor'
|
||||||
strokeWidth.value = 2
|
strokeWidth.value = 2
|
||||||
size.value = 24
|
size.value = 24
|
||||||
|
absoluteStrokeWidth.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(absoluteStrokeWidth, (enabled) => {
|
watch(absoluteStrokeWidth, (enabled) => {
|
||||||
iconContainer.value?.classList.toggle('absolute-stroke-width', enabled)
|
iconContainer.value?.classList.toggle('absolute-stroke-width', enabled)
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -121,6 +123,9 @@ watch(absoluteStrokeWidth, (enabled) => {
|
|||||||
>
|
>
|
||||||
<template #display>
|
<template #display>
|
||||||
<Switch
|
<Switch
|
||||||
|
:key="absoluteStrokeWidth"
|
||||||
|
class="switch"
|
||||||
|
:class="{ enabled: absoluteStrokeWidth }"
|
||||||
id="absolute-stroke-width"
|
id="absolute-stroke-width"
|
||||||
name="absolute-stroke-width"
|
name="absolute-stroke-width"
|
||||||
v-model="absoluteStrokeWidth"
|
v-model="absoluteStrokeWidth"
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ function resetStyle () {
|
|||||||
color.value = STYLE_DEFAULTS.color
|
color.value = STYLE_DEFAULTS.color
|
||||||
strokeWidth.value = STYLE_DEFAULTS.strokeWidth
|
strokeWidth.value = STYLE_DEFAULTS.strokeWidth
|
||||||
size.value = STYLE_DEFAULTS.size
|
size.value = STYLE_DEFAULTS.size
|
||||||
|
absoluteStrokeWidth.value = STYLE_DEFAULTS.absoluteStrokeWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(absoluteStrokeWidth, (enabled) => {
|
watch(absoluteStrokeWidth, (enabled) => {
|
||||||
@@ -119,11 +120,16 @@ const customizingActive = computed(() => {
|
|||||||
id="absolute-stroke-width"
|
id="absolute-stroke-width"
|
||||||
label="Absolute Stroke width"
|
label="Absolute Stroke width"
|
||||||
>
|
>
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
id="size"
|
id="absolute-stroke-width"
|
||||||
name="size"
|
name="absolute-stroke-width"
|
||||||
|
:key="absoluteStrokeWidth"
|
||||||
|
class="switch"
|
||||||
|
:class="{ enabled: absoluteStrokeWidth }"
|
||||||
v-model="absoluteStrokeWidth"
|
v-model="absoluteStrokeWidth"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</InputField>
|
</InputField>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user