Skip to content
Snippets Groups Projects
Commit fc573dfa authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: add useDialogControl helper function for interacting with ADialog component

parent 1127ea7d
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,24 @@
</dialog>
</template>
<script lang="ts">
import { Ref } from 'vue'
export function useDialogControl(dialog: Ref<unknown>) {
function open() {
// @ts-expect-error unknown property access
dialog.value?.open()
}
function close() {
// @ts-expect-error unknown property access
dialog.value?.close()
}
return { open, close }
}
</script>
<script lang="ts" setup>
import { computed, nextTick, ref, useSlots, watch } from 'vue'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment