main
vue 50 lines 1016 Bytes
Raw
1 <template>
2 <n-button :size :type :secondary @click="openModal">
3 <template #icon>
4 <Icon :name="PackIcon" />
5 </template>
6 Stack Provisioning
7 </n-button>
8
9 <n-modal
10 v-model:show="showForm"
11 display-directive="show"
12 preset="card"
13 :style="{ maxWidth: 'min(600px, 90vw)', minHeight: 'min(300px, 90vh)', overflow: 'hidden' }"
14 title="Deploy Content Packs"
15 :bordered="false"
16 segmented
17 >
18 <StackProvisioningList />
19 </n-modal>
20 </template>
21
22 <script setup lang="ts">
23 import type { ButtonSize, ButtonType } from "naive-ui"
24 import { NButton, NModal } from "naive-ui"
25 import { ref } from "vue"
26 import Icon from "@/components/common/Icon.vue"
27 import StackProvisioningList from "./StackProvisioningList.vue"
28
29 defineProps<{
30 size?: ButtonSize
31 type?: ButtonType
32 secondary?: boolean
33 }>()
34
35 const PackIcon = "mdi:package-variant"
36 const showForm = ref(false)
37
38 function openModal() {
39 showForm.value = true
40 }
41
42 function closeModal() {
43 showForm.value = false
44 }
45
46 defineExpose({
47 openModal,
48 closeModal
49 })
50 </script>