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.
50 lines
1.0 KiB
50 lines
1.0 KiB
<app-task-button>
|
|
<button class="button m-bottom-0 m-top-5" onclick={ (event) => { handleOpen(event) } }>
|
|
<svg class="icon fill-text-contrast" aria-hidden="true">
|
|
<use xlink:href="/symbol-defs.svg#icon-close"></use>
|
|
</svg>
|
|
{ state.text }
|
|
</button>
|
|
|
|
<script>
|
|
|
|
import taskFormStore from './../stores/taskForm.js'
|
|
|
|
/**
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
export default {
|
|
|
|
state: {
|
|
text: 'new'
|
|
},
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
onMounted()
|
|
{
|
|
// if props for text is set
|
|
if (this.props.text) {
|
|
this.state.text = this.props.text
|
|
}
|
|
},
|
|
|
|
/**
|
|
*
|
|
* @param {[type]} event
|
|
* @return {[type]}
|
|
*/
|
|
handleOpen(event, data = undefined)
|
|
{
|
|
taskFormStore.open(data)
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
</app-task-button> |