2020-06-06 05:15:44 +02:00
|
|
|
<template>
|
|
|
|
<div class="ftIconButton">
|
|
|
|
<font-awesome-icon
|
|
|
|
class="iconButton"
|
|
|
|
:title="title"
|
|
|
|
:icon="icon"
|
|
|
|
:class="{
|
|
|
|
base: theme === 'base',
|
|
|
|
primary: theme === 'primary',
|
2020-06-11 02:21:31 +02:00
|
|
|
secondary: theme === 'secondary',
|
|
|
|
shadow: useShadow
|
2020-06-06 05:15:44 +02:00
|
|
|
}"
|
|
|
|
@click="handleIconClick"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
v-if="dropdownNames.length > 0 && showDropdown"
|
|
|
|
class="iconDropdown"
|
|
|
|
:class="{
|
|
|
|
left: dropdownPosition === 'left',
|
|
|
|
right: dropdownPosition === 'right',
|
|
|
|
center: dropdownPosition === 'center'
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<p
|
|
|
|
v-for="(label, index) in dropdownNames"
|
|
|
|
:key="index"
|
|
|
|
@click="handleDropdownClick(index)"
|
|
|
|
>
|
|
|
|
{{ label }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./ft-icon-button.js" />
|
|
|
|
<style scoped src="./ft-icon-button.css" />
|