Skip to content

Instantly share code, notes, and snippets.

@MajesticPotatoe
Last active March 20, 2020 14:45
Show Gist options
  • Save MajesticPotatoe/63fd725b9140068f3d2eeece039ea111 to your computer and use it in GitHub Desktop.
Save MajesticPotatoe/63fd725b9140068f3d2eeece039ea111 to your computer and use it in GitHub Desktop.
<template>
<v-tooltip bottom>
<template #activator="{ on }">
<v-btn
:color="color"
:elevation="elevation"
:fab="fab"
:small="small"
class="mx-1"
v-bind="$attrs"
v-on="{
...on,
...$listeners
}"
>
<v-icon>{{ icon }}</v-icon>
<slot />
</v-btn>
</template>
<span>{{ tooltip }}</span>
</v-tooltip>
</template>
<script>
export default {
name: 'BaseToolbarBtn',
props: {
color: {
type: String,
default: 'primary',
},
elevation: {
type: String,
default: '3',
},
fab: {
type: Boolean,
default: true,
},
icon: {
type: String,
default: '',
},
small: {
type: Boolean,
default: true,
},
tooltip: {
type: String,
default: '',
},
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment