refactor: update PreviewColor props to be optional and adjust layout in demos

This commit is contained in:
David Haz
2025-07-15 12:10:43 +03:00
parent 0421c6fd74
commit 114d544102
5 changed files with 15 additions and 20 deletions

View File

@@ -7,7 +7,7 @@
<script setup lang="ts"> <script setup lang="ts">
defineProps<{ defineProps<{
title: string; title?: string;
modelValue: string; modelValue: string;
disabled?: boolean; disabled?: boolean;
}>(); }>();
@@ -27,7 +27,6 @@ const handleColorChange = (event: Event) => {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: 0.5rem;
margin-bottom: 1.5rem;
} }
.color-label { .color-label {

View File

@@ -31,7 +31,7 @@
split-type="words" split-type="words"
:delay="10" :delay="10"
:duration="1" :duration="1"
text="Eighty-plus snippets, ready to be dropped into your Vue projects" text="Sixty-plus snippets, ready to be dropped into your Vue projects"
/> />
<router-link to="/text-animations/split-text" class="landing-button"> <router-link to="/text-animations/split-text" class="landing-button">

View File

@@ -14,10 +14,7 @@
</div> </div>
<Customize> <Customize>
<div class="space-y-2"> <div class="flex gap-2">
<h3 class="text-lg font-semibold text-gray-900 dark:text-gray-100">Color Stops</h3>
<div class="flex gap-4">
<PreviewColor <PreviewColor
v-for="(color, index) in colorStops" v-for="(color, index) in colorStops"
:key="index" :key="index"
@@ -26,7 +23,6 @@
@update:model-value="value => updateColorStop(index, value)" @update:model-value="value => updateColorStop(index, value)"
/> />
</div> </div>
</div>
<PreviewSlider <PreviewSlider
title="Amplitude" title="Amplitude"

View File

@@ -14,7 +14,7 @@
</div> </div>
<Customize> <Customize>
<div class="flex gap-4"> <div class="flex gap-2">
<PreviewColor <PreviewColor
v-for="(color, index) in colorStops" v-for="(color, index) in colorStops"
:key="index" :key="index"
@@ -24,7 +24,7 @@
/> />
</div> </div>
<PreviewSlider title="Pixelation" v-model="pixelation" :min="0" :max="2000" :step="10" /> <PreviewSlider title="Pixelation" v-model="pixelation" :min="100" :max="2000" :step="10" />
<PreviewSwitch title="Enable Mouse Interaction" v-model="mouseInteractionEnabled" /> <PreviewSwitch title="Enable Mouse Interaction" v-model="mouseInteractionEnabled" />