blob: c59c9608349bfabfa1ffa63cee765df32611dc32 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toggle/cr_toggle.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<dom-module id="extensions-toggle-row">
<template>
<style>
:host {
@apply --cr-section;
flex-direction: column;
padding-left: 0;
padding-right: 0;
touch-action: none;
}
input {
display: none;
}
label {
align-items: center;
box-sizing: border-box;
cursor: pointer;
display: flex;
flex: 1;
padding: 0 var(--cr-section-padding);
width: 100%;
}
cr-toggle {
display: inline-block;
}
:host ::slotted(*) {
flex: 1;
}
</style>
<label id="label" on-click="onLabelTap_">
<input id="native" type="checkbox" checked="[[checked]]"
on-change="onNativeChange_" on-click="onNativeClick_">
<slot></slot>
<cr-toggle id="crToggle" checked="{{checked}}"
on-change="onCrToggleChange_"></cr-toggle>
</label>
</template>
<script src="toggle_row.js"></script>
</dom-module>