ckpack / vue-color

(vue3.0) 🎨 Vue Color Pickers UI Library for Sketch, Photoshop, Chrome & more
https://ckpack.github.io/vue-color/
MIT License
176 stars 13 forks source link

Error when passing array of color strings with props #33

Closed demiavaliani closed 4 months ago

demiavaliani commented 4 months ago
<template>
    <Twitter :default-colors="colors" />
</template>

<script lang="ts" setup>
    const colors = ref<ColorInput[]>(['green', 'red']);
</script>

Error in storybook:

image
ckvv commented 4 months ago

Can you provide a reproduction? I tested it and there was no problem

demiavaliani commented 4 months ago

Here you go: https://codesandbox.io/p/sandbox/stupefied-cherry-hwd28q

ckvv commented 4 months ago

Here you go: https://codesandbox.io/p/sandbox/stupefied-cherry-hwd28q

Need to bind v-model to work

<Twitter :default-colors="colors" v-model="value" />

https://codesandbox.io/p/sandbox/relaxed-tess-rz53s9?file=%2Fsrc%2FApp.vue%3A2%2C3-2%2C55

demiavaliani commented 4 months ago

Here you go: https://codesandbox.io/p/sandbox/stupefied-cherry-hwd28q

Need to bind v-model to work

<Twitter :default-colors="colors" v-model="value" />

https://codesandbox.io/p/sandbox/relaxed-tess-rz53s9?file=%2Fsrc%2FApp.vue%3A2%2C3-2%2C55

True. Thanks