Skip to content

Instantly share code, notes, and snippets.

@justinfagnani
Forked from robdodson/quick-alert.html
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinfagnani/8f8492ae6cf9353dcac4 to your computer and use it in GitHub Desktop.
Save justinfagnani/8f8492ae6cf9353dcac4 to your computer and use it in GitHub Desktop.
<link rel="import" href="bower_components/polymer/polymer.html">
<dom-module id="quick-alert">
<style>
:host {
display: block;
position: fixed;
top: 0;
left: 0;
right: 0;
}
.alert {
background-color: #4CAF50;
color: white;
padding: 16px;
font-family: Roboto, Helvetica, sans-serif;
}
.close {
float: right;
}
</style>
<template>
<div class="alert">
<content></content><span class="close">{{closeBtn}}</span>
</div>
</template>
</dom-module>
<script>
'use strict';
class QuickAlert {
static configureClass(clazz) {
clazz.is = 'quick-alert';
clazz.properties = {
closeBtn: {
type: String,
value: 'x'
}
};
super.configureClass(clazz);
}
}
Polymer(QuickAlert);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment