Skip to content

Instantly share code, notes, and snippets.

View dimchanske's full-sized avatar
🎯
Focusing

Dmitry Frolov dimchanske

🎯
Focusing
  • Burnaby, Canada
View GitHub Profile
@dimchanske
dimchanske / TableComponent.vue
Created March 27, 2019 05:46
VueJS Table Component
<template>
<div>
<div class="table-header">
<!-- Global buttons -->
<div class="global-buttons" v-if="globalButtons && globalButtons.length">
<button
class="uk-button uk-button-primary"
v-for="(button, index) in globalButtons"
v-bind:key="index"
@click="typeof button.clickHandler === 'function' && button.clickHandler()"
@dimchanske
dimchanske / ModalComponent.vue
Created March 27, 2019 06:00
VueJS Modal Component
<template>
<transition name="fade" @after-enter="showContent = true">
<!-- Modal wrapper with overlay -->
<div
id="modal-sections"
v-if="show"
v-bind:class="['uk-modal', { 'uk-open': true, 'uk-display-block': true }]"
@click.self="onClickModalBackground"
>
<!-- Modal content -->