Skip to content

Instantly share code, notes, and snippets.

@robdodson
Created April 7, 2015 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save robdodson/4dbbbf8afad9db445a8f to your computer and use it in GitHub Desktop.
Save robdodson/4dbbbf8afad9db445a8f to your computer and use it in GitHub Desktop.
quick-alert
<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 {
registerCallback() {
this.is = 'quick-alert';
this.properties = {
closeBtn: {
type: String,
value: 'x'
}
};
super.registerCallback();
}
}
Polymer(QuickAlert.prototype);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment