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

    Customise Notify action buttons with QBtn API props

    Help
    2
    3
    722
    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.
    • T
      tohagan last edited by tohagan

      Looking at the code for the Notify plugin I can see that it’s generating QBtn’s and appears to accept any QBtn prop for any notify action that you can set either via attrs or ...props . However I can’t seem to make either work. Specifically I’d like to set the background color for an action button.

      • https://github.com/quasarframework/quasar/blob/e42dc072140ff266790065d498c28d30d5a40dae/ui/src/plugins/Notify.js#L169
           this.$q.notify({
              message: "some message,
              color: "white",
              textColor: "primary",
              avatar: this.logo,
              rounded: true,
              multiLine: true,
              timeout: 0,
              actions: [
                {
                  label: "OK",
                  style: "background: primary; color: white"
                }
              ]
            });
      
      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by metalsadman

        @tohagan use class ie.

        this.$q.notify({
                message: "some message,
                color: "white",
                textColor: "primary",
                avatar: this.logo,
                rounded: true,
                multiLine: true,
                timeout: 0,
                actions: [
                  {
                    label: "OK",
                    class: 'bg-primary',
                    color: 'white'
                  }
                ]
              });
        1 Reply Last reply Reply Quote 0
        • T
          tohagan last edited by

          Was an old app and turned out that I just needed to upgrade Quasar.

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