Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- Copyright 2016 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-icon/iron-icon.htm l"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-iconset-svg/iron-i conset-svg.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-button/paper-butt on.html"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-fab/paper-fab.htm l"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-fab/paper-fab.htm l"> |
| 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 | 10 |
| 11 <iron-iconset-svg name="oobe-buttons" size="24"> | |
| 12 <svg> | |
| 13 <defs> | |
| 14 <g id="arrow-back"> | |
| 15 <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"> | |
| 16 </path> | |
| 17 </g> | |
| 18 </defs> | |
| 19 </svg> | |
| 20 </iron-iconset-svg> | |
| 21 | |
| 10 <!-- | 22 <!-- |
| 11 Material design square button for text-labelled buttons. | 23 Material design square button for text-labelled buttons. |
| 12 By default, text is blue, background is white. | 24 By default, text is blue, background is white. |
| 13 |inverse| makes text white on a blue background. | 25 |inverse| makes text white on a blue background. |
| 26 Note, that content must have separate DOM node (i.e. a separete div). | |
|
michaelpg
2016/11/14 21:25:18
"separate"
Alexander Alekseev
2016/11/15 01:23:00
Done.
| |
| 14 | 27 |
| 15 Example: | 28 Example: |
| 16 <oobe-icon-button i18n-content="oobeOKButtonText" inverse> | 29 <oobe-icon-button inverse> |
| 30 <div i18n-content="oobeOKButtonText"></div> | |
| 17 </oobe-icon-button> | 31 </oobe-icon-button> |
| 18 <oobe-icon-button i18n-content="oobeCancelButtonText"></oobe-icon-button> | |
| 19 | 32 |
| 20 Attributes: | 33 Attributes: |
| 21 'disabled' - button is disabled when the attribute is set. | 34 'disabled' - button is disabled when the attribute is set. |
| 22 'inverse' - makes text white and background blue | 35 'inverse' - makes text white and background blue |
| 23 --> | 36 --> |
| 24 <dom-module id="oobe-text-button"> | 37 <dom-module id="oobe-text-button"> |
| 25 <link rel="stylesheet" href="oobe_text_button.css"> | 38 <link rel="stylesheet" href="oobe_text_button.css"> |
| 26 <template> | 39 <template> |
| 27 <paper-button id="textButton" on-tap="onClick_" disabled="[[disabled]]" | 40 <paper-button id="textButton" on-tap="onClick_" disabled="[[disabled]]" |
| 28 inverse$="[[inverse]]"> | 41 inverse$="[[inverse]]"> |
| 29 <content></content> | 42 <content></content> |
| 30 </paper-button> | 43 </paper-button> |
| 31 </template> | 44 </template> |
| 32 </dom-module> | 45 </dom-module> |
| 33 | 46 |
| 34 <!-- | 47 <!-- |
| 48 Material design square "<- Back" button. | |
| 49 Text is blue, background is white. | |
| 50 | |
| 51 Example: | |
| 52 <oobe-back-button on-tap="handleOnTap_"> | |
| 53 </oobe-back-button> | |
| 54 | |
| 55 Attributes: | |
| 56 'disabled' - button is disabled when the attribute is set. | |
| 57 --> | |
| 58 <dom-module id="oobe-back-button"> | |
| 59 <link rel="stylesheet" href="oobe_back_button.css"> | |
| 60 <template> | |
| 61 <paper-button id="button" on-tap="onClick_" disabled="[[disabled]]"> | |
| 62 <div class="flex horizontal layout start center"> | |
| 63 <iron-icon icon="oobe-buttons:arrow-back"></iron-icon> | |
| 64 <div id="text" i18n-content="back"></div> | |
| 65 </div> | |
| 66 </paper-button> | |
| 67 </template> | |
| 68 </dom-module> | |
| 69 | |
| 70 <!-- | |
| 35 Material design button that shows an icon and displays text. | 71 Material design button that shows an icon and displays text. |
| 36 | 72 |
| 37 Example: | 73 Example: |
| 38 <oobe-welcome-secondary-button icon="close" | 74 <oobe-welcome-secondary-button icon="close"> |
| 39 i18n-content="oobeCloseButtonText"> | 75 <div i18n-content="oobeCloseButtonText"></div> |
| 40 </oobe-icon-button> | 76 </oobe-welcome-secondary-button> |
| 41 | 77 |
| 42 Attributes: | 78 Attributes: |
| 43 'icon' - a name of icon from material design set to show on button. | 79 'icon' - a name of icon from material design set to show on button. |
| 44 'aria-label' - accessibility label. | 80 'aria-label' - accessibility label. |
| 45 --> | 81 --> |
| 46 <dom-module id="oobe-welcome-secondary-button"> | 82 <dom-module id="oobe-welcome-secondary-button"> |
| 47 <link rel="stylesheet" href="oobe_welcome_secondary_button.css"> | 83 <link rel="stylesheet" href="oobe_welcome_secondary_button.css"> |
| 48 <template> | 84 <template> |
| 49 <paper-button id="container" class="layout horizontal center" | 85 <paper-button id="container" class="layout horizontal center" |
| 50 aria-label="[[ariaLabel]]"> | 86 aria-label="[[ariaLabel]]"> |
| 51 <iron-icon icon="[[icon]]" class="oobe-icon"></iron-icon> | 87 <iron-icon icon="[[icon]]" class="oobe-icon"></iron-icon> |
| 52 <content></content> | 88 <content></content> |
| 53 </paper-button> | 89 </paper-button> |
| 54 </template> | 90 </template> |
| 55 </dom-module> | 91 </dom-module> |
| OLD | NEW |