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

View File

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