mirror of
https://github.com/ArenMg/aren.git
synced 2024-06-26 10:23:45 +00:00
22 lines
869 B
Vue
22 lines
869 B
Vue
<template>
|
|
<tooltiped v-if="tooltip || tooltipDisabled"
|
|
v-bind:value="(disabled && tooltipDisabled) ? tooltipDisabled : tooltip">
|
|
<span v-bind:class="'waves-effect waves-light btn' + (disabled ? ' disabled' : '')"
|
|
@click="disabled ? '' : $emit('press', $event)">
|
|
<i v-if='icon' class="material-icons">{{icon}}</i>
|
|
<template v-else>{{ label}}</template>
|
|
</span>
|
|
</tooltiped>
|
|
<span v-else
|
|
v-bind:class="'waves-effect waves-light btn' + (disabled ? ' disabled' : '')"
|
|
@click="disabled ? '' : $emit('press', $event)">
|
|
<i v-if='icon' class="material-icons">{{icon}}</i>
|
|
<template v-else>{{ label}}</template>
|
|
</span>
|
|
</template>
|
|
|
|
<script>
|
|
module.exports = {
|
|
props: ['tooltip', 'disabled', 'tooltipDisabled', 'icon', 'label']
|
|
};
|
|
</script> |