How to use computed property in the class names

I have a computed property name danger which returns some data in string format, but it is not working.

:class="{
            't-button__primary': !outline,
            't-button__disabled': disabled,
            't-button__outline': outline,
            danger
        }"

and statically showing the danger as class name while rendering inside the DOM.

Tags:#vuejs

No Comments Yet