Refactor directive to be more specific

This commit is contained in:
Ramon Wenger 2024-02-01 14:55:04 +01:00
parent 9b813f113b
commit f69af1e4cf
2 changed files with 2 additions and 3 deletions

View File

@ -42,6 +42,8 @@ export interface Props {
highlight: HighlightNode;
}
import vAutoGrow from '@/directives/auto-grow';
const emits = defineEmits(['close', 'update-text']);
const close = () => emits('close');

View File

@ -1,6 +1,5 @@
import { App, createApp, ref } from 'vue';
import HighlightSidebar from '@/components/highlights/HighlightSidebar.vue';
import autoGrow from '@/directives/auto-grow';
import { HighlightNode } from '@/__generated__/graphql';
interface Options {
@ -54,8 +53,6 @@ export default {
cleanUp: cleanUp,
};
sidebar.directive('auto-grow', autoGrow); // todo: can this be done a different way? maybe use this declaration inside the component itself
sidebar.mount(mountEl);
setTimeout(() => {