| <link rel="import" href="chrome://resources/html/polymer.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-checkbox.html"> |
| <link rel="import" href="settings_boolean_control_behavior.html"> |
| <link rel="import" href="../settings_shared_css.html"> |
| |
| <dom-module id="settings-checkbox"> |
| <template> |
| <style include="settings-shared"> |
| #outerRow { |
| align-items: center; |
| display: flex; |
| min-height: var(--settings-row-two-line-min-height); |
| width: 100%; |
| } |
| |
| #outerRow[noSubLabel] { |
| min-height: var(--settings-row-min-height); |
| } |
| |
| paper-checkbox { |
| width: 100%; |
| } |
| |
| paper-checkbox:not([checked]) .secondary { |
| @apply(--settings-secondary-unchecked); |
| } |
| |
| cr-policy-pref-indicator { |
| -webkit-margin-start: var(--checkbox-spacing); |
| } |
| </style> |
| <div id="outerRow" noSubLabel$="[[!subLabel]]"> |
| <paper-checkbox id="checkbox" checked="{{checked}}" |
| disabled="[[controlDisabled_(disabled, pref)]]"> |
| <div>[[label]] <content></content></div> |
| <div class="secondary">[[subLabel]]</div> |
| </paper-checkbox> |
| <template is="dom-if" if="[[pref.controlledBy]]"> |
| <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> |
| </template> |
| </div> |
| </template> |
| <script src="settings_checkbox.js"></script> |
| </dom-module> |