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.
54 lines
1.2 KiB
54 lines
1.2 KiB
<app-hub-create>
|
|
<button class="button m-bottom-0" onclick={ (event) => { handleOpen(event) } }>
|
|
<svg class="icon fill-text m-top-1 m-right-3" aria-hidden="true">
|
|
<use xlink:href="/symbol-defs.svg#icon-close"></use>
|
|
</svg>
|
|
{ state.text }
|
|
</button>
|
|
|
|
<script>
|
|
|
|
import hubStore from './../../stores/hub.js'
|
|
|
|
/**
|
|
* handle open and close of form for tasks
|
|
*
|
|
*
|
|
* @author Björn Hase, <me@herr-hase.wtf>
|
|
*
|
|
*/
|
|
|
|
export default {
|
|
|
|
state: {
|
|
text: 'new'
|
|
},
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
onMounted()
|
|
{
|
|
// if props for text is set
|
|
if (this.props.text) {
|
|
this.state.text = this.props.text
|
|
}
|
|
},
|
|
|
|
/**
|
|
* trigger open in storage
|
|
*
|
|
*
|
|
* @param {object} event
|
|
*
|
|
*/
|
|
handleOpen(event, data = undefined)
|
|
{
|
|
hubStore.trigger('open', data)
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
</app-hub-create> |