-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
155 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<script setup lang="ts"> | ||
import type { DialogWrapperProps } from '@/types/props'; | ||
import EditEndpointDialogue from './EditEndpointDialogue.vue'; | ||
import { ref } from 'vue'; | ||
defineProps<DialogWrapperProps>(); | ||
const dialog = ref<HTMLDialogElement | null>(null); | ||
const openModal = () => dialog.value?.showModal(); | ||
const closeModal = () => dialog.value?.close(); | ||
</script> | ||
|
||
<template> | ||
<button | ||
class="button" | ||
@click="openModal" | ||
> | ||
{{ label }} | ||
</button> | ||
<dialog | ||
class="box m-auto p-0" | ||
ref="dialog" | ||
@click.self="closeModal" | ||
> | ||
<EditEndpointDialogue :endpoint-data /> | ||
</dialog> | ||
</template> | ||
|
||
<style scoped> | ||
dialog { | ||
border: 1px solid #80808080; | ||
display: none; | ||
max-width: 525px; | ||
&[open] { | ||
display: block; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// calling this function in another module will increment this local counter. | ||
// the counter is therefore shared across all instances and guarantees to give a unique number on every function call | ||
let id = 0; | ||
export const useId = () => id++; |
Oops, something went wrong.