I need to pass some props to a component, I have the props in an object and I want to do something like this:
<v-btn
btn.size.sm
btn.size.md
btn.size.lg
>
{{ btn.text }}
</v-btn>
Where my btn
object looks like this:
btn = {
text:"Click me",
size:{
sm:"sm-12",
md:"md-6",
lg:"lg-4"
}
}
the resulting component would then be equivalent to writing:
<v-btn
sm-12
md-6
lg-4
>
{{ btn.text }}
</v-btn>
Is this even possible? The only way I can think to do this at the moment is to have a prop for every size variation and then conditionally set it to true or false. but that seems like such overkill. Anyone got any ideas?
FYI - I'm using Vuetify if that makes any difference