1 <!-- Copyright 2015 The Chromium Authors. All rights reserved.
2 Use of this source code is governed by a BSD-style license that can be
3 found in the LICENSE file. -->
5 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
6 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/iron-icons/iron-icons.html">
7 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/paper-styles/color.html">
8 <link rel=
"import" href=
"chrome://resources/polymer/v1_0/polymer/polymer.html">
11 A simple notification card with a button, link (optional) and icon (optional).
13 <notification-card button-label="OK" link-label="What?" type="success">
18 'button-label' - label displayed on the button. If empty or not set, the
20 'link-label' - text of the link. If empty or not set, the link is hidden.
21 'type' - icon type. Can be either 'success' or 'fail'. If not set, no icon
25 'buttonclick' - fired on button click.
26 'linkclick' - fired on link click.
29 <dom-module name=
"notification-card">
30 <link rel=
"stylesheet" href=
"notification_card.css">
33 <div id=
"container" class=
"vertical layout center fit">
34 <div class=
"flex vertical layout center center-justified">
35 <template is=
"dom-if" if=
"[[type]]">
36 <div id=
"icon-container" class=
"vertical layout center">
37 <iron-icon icon$=
"[[iconNameByType_(type)]]">
41 <div id=
"text-container">
45 <div class=
"self-stretch horizontal-reverse layout justified center">
46 <gaia-button id=
"submitButton" on-tap=
"buttonClicked_"
47 hidden$=
"[[!buttonLabel]]">
48 <span>[[buttonLabel]]
</span>
50 <a href=
"#" on-click=
"linkClicked_" hidden$=
"{{!linkLabel}}">
51 <span>[[linkLabel]]
</span>