It's time to ditch Medium for good! 🌈⚡️

Introducing Devblog by Hashnode. Blog on your domain for FREE. Highly customizable and optimized for developers.

Learn more

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.

Write your answer…

Be the first one to answer this question