Dmitrii Filippov | daf0ec9 | 2020-03-17 11:27:28 +0100 | [diff] [blame] | 1 | /** |
| 2 | * @license |
| 3 | * Copyright (C) 2020 The Android Open Source Project |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
Dmitrii Filippov | 89a6b77 | 2020-07-14 15:45:31 +0200 | [diff] [blame] | 17 | import {html} from '@polymer/polymer/lib/utils/html-tag'; |
Wyatt Allen | ffae724 | 2018-02-14 15:58:17 -0800 | [diff] [blame] | 18 | |
Dmitrii Filippov | daf0ec9 | 2020-03-17 11:27:28 +0100 | [diff] [blame] | 19 | export const htmlTemplate = html` |
Tao Zhou | 6d8561b | 2020-04-27 12:24:31 +0200 | [diff] [blame] | 20 | <style include="shared-styles"> |
| 21 | :host { |
| 22 | /* Used to remove horizontal whitespace between the icons. */ |
| 23 | display: flex; |
| 24 | } |
| 25 | gr-button.selected iron-icon { |
| 26 | color: var(--link-color); |
| 27 | } |
| 28 | iron-icon { |
| 29 | height: 1.3rem; |
| 30 | width: 1.3rem; |
| 31 | } |
| 32 | </style> |
| 33 | <gr-button |
| 34 | id="sideBySideBtn" |
| 35 | link="" |
| 36 | has-tooltip="" |
Milutin Kristofic | 3828cc3 | 2021-07-28 14:49:48 +0200 | [diff] [blame] | 37 | position-below="[[showTooltipBelow]]" |
Ben Rohlfs | 96caad9 | 2020-08-14 21:32:38 +0200 | [diff] [blame] | 38 | class$="[[_computeSideBySideSelected(mode)]]" |
Tao Zhou | 6d8561b | 2020-04-27 12:24:31 +0200 | [diff] [blame] | 39 | title="Side-by-side diff" |
Milutin Kristofic | 88b0408 | 2020-08-20 17:00:30 +0200 | [diff] [blame] | 40 | aria-pressed="[[isSideBySideSelected(mode)]]" |
Tao Zhou | 6d8561b | 2020-04-27 12:24:31 +0200 | [diff] [blame] | 41 | on-click="_handleSideBySideTap" |
| 42 | > |
| 43 | <iron-icon icon="gr-icons:side-by-side"></iron-icon> |
| 44 | </gr-button> |
| 45 | <gr-button |
| 46 | id="unifiedBtn" |
| 47 | link="" |
| 48 | has-tooltip="" |
Milutin Kristofic | 3828cc3 | 2021-07-28 14:49:48 +0200 | [diff] [blame] | 49 | position-below="[[showTooltipBelow]]" |
Tao Zhou | 6d8561b | 2020-04-27 12:24:31 +0200 | [diff] [blame] | 50 | title="Unified diff" |
Ben Rohlfs | 96caad9 | 2020-08-14 21:32:38 +0200 | [diff] [blame] | 51 | class$="[[_computeUnifiedSelected(mode)]]" |
Milutin Kristofic | 88b0408 | 2020-08-20 17:00:30 +0200 | [diff] [blame] | 52 | aria-pressed="[[isUnifiedSelected(mode)]]" |
Tao Zhou | 6d8561b | 2020-04-27 12:24:31 +0200 | [diff] [blame] | 53 | on-click="_handleUnifiedTap" |
| 54 | > |
| 55 | <iron-icon icon="gr-icons:unified"></iron-icon> |
| 56 | </gr-button> |
Dmitrii Filippov | daf0ec9 | 2020-03-17 11:27:28 +0100 | [diff] [blame] | 57 | `; |