You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loading/src/exampleLoading.riot

39 lines
1016 B

<example-loading>
<div class="example m-top-5">
<label class="field-label">
<input class="field-choice" type="checkbox" name="radio" value="true" onchange={ () => { handleSwitch() } }>
<span class="field-switch"></span>
</label>
<div class="panel" if={ state.isActive }>
<div class="panel__body">
<tiny-loading active={ state.isActive }></tiny-loading>
</div>
</div>
</div>
<script>
export default {
state: {
isActive: false
},
/**
* toggle active to show panel and tiny-loading
*
*/
handleSwitch()
{
if (this.state.isActive === true) {
this.state.isActive = false
} else {
this.state.isActive = true
}
this.update()
}
}
</script>
</example-loading>