No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Q-toggle does not accept custom color

    Framework
    1
    1
    108
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jonathan_on
      jonathan_on last edited by

      I created a custom color variable, as indicated in the documentation, and managed to use it in several components, but in q-toggle it doesn’t work, when I try, it just ignores it.

      boot.js:

      import {colors} from "quasar";
      
      colors.setBrand('mycolor', '#ff4e0f');
      

      quasar.variables.sass:

      $mycolor: #FF4E0F
      
      <q-toggle color="mycolor" keep-color v-model="dark" @input="changeDarkMode" />
      <q-btn label="Test" color="mycolor" />
      

      Anotação 2020-07-16 180129.png

      1 Reply Last reply Reply Quote 0
      • First post
        Last post