using knockout to set css class with an if condition
Ternary operator example
<span class="label"
data-bind="text: isApproved,
css: isApproved() == true ? 'label-success' : 'label-important'">
</span>
If I understood you right, this is the binding you are looking for.
data-bind="text: isApproved, css: {
'label' : true,
'label-success' : isApproved(),
'label-important': !isApproved()
}"
I hope it helps.