From b16fe24ddc82ed56ca69116f04dd89ca3ab4b1ce Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Mon, 6 Aug 2018 16:54:12 -0400 Subject: [PATCH] Working modal component --- js/index.js | 19 ++++++++++++++++++- styles/core/_util.scss | 4 ++++ templates/components/modal.html | 26 ++++++++++++-------------- templates/styleguide.html | 31 ++++++++++++++----------------- 4 files changed, 48 insertions(+), 32 deletions(-) diff --git a/js/index.js b/js/index.js index 0c122a10..1ec66270 100644 --- a/js/index.js +++ b/js/index.js @@ -1,6 +1,23 @@ import classes from '../styles/atat.scss' import Vue from 'vue/dist/vue' -import './example' +const app = new Vue({ + el: '#vue-root', + methods: { + closeModal: function(name) { + this.modals[name] = false + }, + openModal: function (name) { + this.modals[name] = true + } + }, + data: function() { + return { + modals: { + styleguideModal: false, + } + } + } +}) console.log('hello from index') diff --git a/styles/core/_util.scss b/styles/core/_util.scss index 48957b6c..c041db1e 100644 --- a/styles/core/_util.scss +++ b/styles/core/_util.scss @@ -31,3 +31,7 @@ @mixin line-max { max-width: 45em; } + +[v-cloak] { + display: none +} diff --git a/templates/components/modal.html b/templates/components/modal.html index c6918a0e..aedebd42 100644 --- a/templates/components/modal.html +++ b/templates/components/modal.html @@ -1,23 +1,21 @@ {% from "components/icon.html" import Icon %} {% macro Modal(name, dismissable=False) -%} - -
-