mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-25 17:26:15 -04:00
feat(new-tool): html wysiwyg editor
This commit is contained in:
parent
b1d6bfd2dc
commit
f3b1863f09
8 changed files with 911 additions and 6 deletions
22
src/tools/html-wysiwyg-editor/editor/menu-bar-item.vue
Normal file
22
src/tools/html-wysiwyg-editor/editor/menu-bar-item.vue
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue