FreeTube/src/renderer/components/ft-icon-button/ft-icon-button.vue

40 lines
951 B
Vue
Raw Normal View History

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',
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'
}"
>
2020-06-16 18:50:46 +02:00
<ul class="list">
<li
v-for="(label, index) in dropdownNames"
class="listItem"
:key="index"
@click="handleDropdownClick(index)"
>
{{ label }}
</li>
</ul>
2020-06-06 05:15:44 +02:00
</div>
</div>
</template>
<script src="./ft-icon-button.js" />
2020-06-16 18:50:46 +02:00
<style scoped lang="sass" src="./ft-icon-button.sass" />