So I created a simple component:
Vue.component('m-textbox', {
template: `
<div>
<div class="input-field col s12 m6 l6">
<input :id="id" type="text" :value="value" @input="$emit('input', $event.target.value)">
<label :for="id">{{ label }}</label>
</div>
</div>
`,
props: ["id", "value", "label", "for"]
})
And I use it in my html like this:
<m-textbox v-model="full_name" id="full_name" label="Full Name"></m-textbox>
Now what I wanted to do is to make the columns settable. The default as you can see is col 12 m6 l6. Is there a way to make it dynamic? Like for example I can just do <m-textbox v-model="full_name" id="full_name" label="Full Name" classSize="col s12 m6"></m-textbox>.
Any help would be much appreciated.