JSFiddle - React, Tailwind, and code Playground

by leopoldthecuber

HTML

<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
  <el-button @click="open">open dropdown</el-button>
  <el-dropdown ref="dropdown">
    <span class="el-dropdown-link">
      Dropdown List<i class="el-icon-arrow-down el-icon--right"></i>
    </span>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item>Action 1</el-dropdown-item>
      <el-dropdown-item>Action 2</el-dropdown-item>
      <el-dropdown-item>Action 3</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</div>

SCSS

@import url("//unpkg.com/[email protected]/lib/theme-chalk/index.css");
.el-dropdown-link {
  cursor: pointer;
  color: #409EFF;
}
.el-icon-arrow-down {
  font-size: 12px;
}

Babel + JSX

new Vue({
  methods: {
    open() {
      this.$refs.dropdown.show();
    }
  }
}).$mount('#app')