<template>
<button on:click="this.clicked" :clicked="${ this.state.status === 'clicked' }"><slot></slot> (${ this.state.status })</button>
</template>
<script>
this.state.status = 'unclicked'
this.clicked = () => {
this.state.status = this.state.status === 'unclicked' ? 'clicked' : 'unclicked'
this.render()
}
</script>
<style>
button {
padding: 1rem 2rem;
border-radius: .5rem;
cursor: pointer;
}
</style>