added testdata toggle control

This commit is contained in:
Joel McKinnon 2020-01-28 11:44:29 -08:00
parent b3488c54cd
commit 3cc630d4c2
2 changed files with 16 additions and 5 deletions

View File

@ -14,10 +14,13 @@
<div v-if="expanded"
class="c-cs__ui_content"
>
<label class="checkbox custom">
<input type="checkbox"
class="t-test-data-checkbox"
<label class="c-toggle-switch">
<input
type="checkbox"
:checked="isApplied"
@change="applyTestData"
>
<span class="c-toggle-switch__slider"></span>
<span>Apply Test Data</span>
</label>
<div class="t-test-data-config">
@ -58,11 +61,14 @@ export default {
},
data() {
return {
expanded: true
expanded: true,
isApplied: true
};
},
methods: {
applyTestData(ev) {
this.$emit('change', ev.target.checked);
}
}
}
</script>

View File

@ -27,6 +27,11 @@ section {
padding: 0.4em;
}
.c-cs-ui__label {
color: #333;
vertical-align: middle;
}
.c-cs__ui_content .help {
font-style: italic;
padding: 0.4em 0;