is component dynamic component

by Saurabh Mimani

HTML

<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<div id="app">
<column type="section" classList="col--4-12 col--6-12--m col--1-1--s">
 testasdfasdfa
</column>
</div>

JavaScript

const column = {
  template: `  <component :is="type" :class="classList">
    <slot></slot><br/>
    My tag is {{type}}
  </component>`,
      name: "column",
    props: ['classList', 'type'],
    data() {
      return {
        classList: this.classList || '',
        type: this.type || 'div',
      };
    }
}

new Vue({
  el: '#app',
  components: {column}
})