Created
April 7, 2015 04:47
-
-
Save robdodson/4dbbbf8afad9db445a8f to your computer and use it in GitHub Desktop.
quick-alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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