feat(new-tool): html wysiwyg editor

This commit is contained in:
Corentin Thomasset 2023-03-26 19:04:42 +02:00 committed by Corentin THOMASSET
parent b1d6bfd2dc
commit f3b1863f09
8 changed files with 911 additions and 6 deletions

View file

@ -0,0 +1,22 @@
<template>
<n-tooltip trigger="hover">
<template #trigger>
<n-button circle quaternary :type="isActive?.() ? 'primary' : 'default'" @click="action">
<template #icon>
<n-icon :component="icon" />
</template>
</n-button>
</template>
{{ title }}
</n-tooltip>
</template>
<script setup lang="ts">
import { toRefs, type Component } from 'vue';
const props = defineProps<{ icon: Component; title: string; action: () => void; isActive?: () => boolean }>();
const { icon, title, action, isActive } = toRefs(props);
</script>
<style scoped></style>