Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 1 <!-- Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 Use of this source code is governed by a BSD-style license that can be | 2 Use of this source code is governed by a BSD-style license that can be |
| 3 found in the LICENSE file. --> | 3 found in the LICENSE file. --> |
| 4 | 4 |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h tml"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-fab/paper-fab.htm l"> | |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html "> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html "> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | |
| 10 | 10 |
| 11 <!-- | 11 <!-- |
| 12 Material design buttons that mimic GAIA's buttons. | 12 Material design button that shows a forward arrow, typically used for |
| 13 navigating to the next page/screen. | |
| 14 | |
| 15 Attributes: | |
| 16 'disabled' - button is disabled when the attribute is set. | |
| 13 | 17 |
| 14 Example: | 18 Example: |
| 15 <gaia-button type="dialog"></gaia-button> | 19 <oobe-next-button></oobe-next-button> |
| 16 | |
| 17 Attributes: | |
| 18 'type' - there are three kinds of button: regular blue button (none type | |
| 19 provided), dialog button (type="dialog") and a button that looks | |
| 20 more like a link (type="link"). | |
| 21 'disabled' - button is disabled when the attribute is set. | |
| 22 --> | 20 --> |
| 23 <dom-module id="gaia-button"> | 21 <dom-module id="oobe-next-button"> |
| 24 <link rel="stylesheet" href="gaia_button.css"> | 22 <style> |
| 23 :host { | |
| 24 display: inline-block; | |
| 25 } | |
| 26 paper-fab { | |
| 27 background-color: var(--google-blue-500); | |
| 28 color: white; | |
| 29 font-size: 14px; | |
| 30 } | |
| 31 </style> | |
| 25 | 32 |
| 26 <template> | 33 <template> |
| 27 <div on-click="onClick_" on-tap="onClick_"> | 34 <paper-fab icon="arrow-forward" disabled="[[disabled]]"></paper-fab> |
| 28 <paper-button id="button" disabled="[[disabled]]" | |
| 29 on-focused-changed="focusedChanged_"> | |
| 30 <content></content> | |
| 31 </paper-button> | |
| 32 </div> | |
| 33 </template> | 35 </template> |
| 34 </dom-module> | 36 </dom-module> |
| 35 | 37 |
| 36 <!-- | 38 <!-- |
| 37 Material desing icon button with a special styling. | 39 Material design button that shows an icon. |
| 38 | 40 |
| 39 Example: | 41 Example: |
| 40 <gaia-icon-button icon="close"></gaia-icon> | 42 <oobe-icon-button icon="close"></oobe-icon> |
|
dzhioev_at_google
2016/05/25 01:01:32
nit: opening and closing tags are different
Alexander Alekseev
2016/05/25 23:47:29
Done.
| |
| 41 | 43 |
| 42 Attributes: | 44 Attributes: |
| 43 'icon' - a name of icon from material design set to show on button. | 45 'icon' - a name of icon from material design set to show on button. |
| 44 'disabled' - button is disabled when the attribute is set. | 46 'disabled' - button is disabled when the attribute is set. |
| 45 'aria-label' - accessibility label. | 47 'aria-label' - accessibility label. |
| 46 --> | 48 --> |
| 47 <dom-module id="gaia-icon-button"> | 49 <dom-module id="oobe-icon-button"> |
| 48 <link rel="stylesheet" href="gaia_icon_button.css"> | 50 <style> |
| 51 #iconButton { | |
| 52 height: 24px; | |
| 53 padding: 0; | |
| 54 width: 24px; | |
| 55 } | |
| 56 </style> | |
| 49 | 57 |
| 50 <template> | 58 <template> |
| 51 <div on-click="onClick_" on-tap="onClick_"> | 59 <div on-click="onClick_" on-tap="onClick_"> |
| 52 <paper-icon-button id="iconButton" icon="[[icon]]" disabled="[[disabled]]" | 60 <paper-icon-button id="iconButton" icon="[[icon]]" disabled="[[disabled]]" |
| 53 aria-label="[[ariaLabel]]"> | 61 aria-label="[[ariaLabel]]"> |
| 54 </paper-icon-button> | 62 </paper-icon-button> |
| 55 </div> | 63 </div> |
| 56 </template> | 64 </template> |
| 57 </dom-module> | 65 </dom-module> |
| 58 | 66 |
| OLD | NEW |