I have this component with some dynamic classes but it looks a little messy and I can't seem to figure out if there's a better way to write it. The class binding in vue kind of confuses me.
I'm using pug btw, but the focus should be on the :class anyway
section.section(:class="{'section--margin-top': cartStep === 1 && cart.length >= 3, 'section--full-screen section--centered' : cartStep !== 1 || cart.length < 3 }")
Should I be using a computed property? Or maybe the array syntax (which I can't quite wrap my head around)? Or...?
Thanks everyone for the help.