blob: 047c015cbf2268a594fa55b3a4ace9e6e7c2901f [file] [log] [blame]
<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="/controls/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:not([disabled]) {
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>