Skip to content

Button with custom color #17147

Discussion options

You must be logged in to vote

For those who need answer:

<q-btn :style="{ 'background-color': color }" @click='onVariablesColor();'>{{ variablesColor }}</q-btn>

setup
{
    const color = ref('#ff0000');
    return color;
},

methods:
{
    onVariablesColor()
    {
        //here the color of the button may be changed
        this.color = this.store.state.editor.dialog_color;
    }
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by denprog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant