mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 01:26:44 +00:00
* ensure that eslint runs on all frontend code * remove tslint from `design-system` * enable prettier and eslint-prettier for `design-system` * Delete tslint.json * use a single editorconfig for the repo * enable prettier for all code in `design-system` * more linting fixes on design-system * ignore coverage for git and prettier * lintfix on editor-ui
68 lines
1.3 KiB
Vue
68 lines
1.3 KiB
Vue
<template>
|
|
<el-tooltip v-bind="$attrs">
|
|
<template v-for="(_, slotName) in $slots" #[slotName]>
|
|
<slot :name="slotName" />
|
|
<div
|
|
:key="slotName"
|
|
v-if="slotName === 'content' && buttons.length"
|
|
:class="$style.buttons"
|
|
:style="{ justifyContent: justifyButtons }"
|
|
>
|
|
<n8n-button
|
|
v-for="button in buttons"
|
|
:key="button.attrs.label"
|
|
v-bind="button.attrs"
|
|
v-on="button.listeners"
|
|
/>
|
|
</div>
|
|
</template>
|
|
</el-tooltip>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue, { PropType } from 'vue';
|
|
import ElTooltip from 'element-ui/lib/tooltip';
|
|
import type { IN8nButton } from '@/types';
|
|
import N8nButton from '../N8nButton';
|
|
|
|
export default Vue.extend({
|
|
name: 'n8n-tooltip',
|
|
inheritAttrs: false,
|
|
components: {
|
|
ElTooltip, // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
|
N8nButton,
|
|
},
|
|
props: {
|
|
justifyButtons: {
|
|
type: String,
|
|
default: 'flex-end',
|
|
validator: (value: string): boolean =>
|
|
[
|
|
'flex-start',
|
|
'flex-end',
|
|
'start',
|
|
'end',
|
|
'left',
|
|
'right',
|
|
'center',
|
|
'space-between',
|
|
'space-around',
|
|
'space-evenly',
|
|
].includes(value),
|
|
},
|
|
buttons: {
|
|
type: Array as PropType<IN8nButton[]>,
|
|
default: () => [],
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" module>
|
|
.buttons {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-top: var(--spacing-s);
|
|
}
|
|
</style>
|