Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Turn Palette Color Picker
<li v-for="color in colors" :style="{ background: `rgb(${color[0]},${color[1]},${color[2]})`}" @click="selectColor(color)"></li>
export default{
props: ['colors'],
methods: {
selectColor(color) {
this.$nuxt.$emit('COLOR_SELECTED', color)
<style scope>
display: flex;
height: 1em;
margin-bottom: 0.5em;
width: 100%;
ul li{
cursor: pointer;
flex: 1;
ul li:first-child{
border-radius: 0.25em 0 0 0.25em;
ul li:last-child{
border-radius: 0 0.25em 0.25em 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.