-
-
Save justinfagnani/8f8492ae6cf9353dcac4 to your computer and use it in GitHub Desktop.
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 { | |
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