Files
AstralRinth/apps/app-frontend/src/components/ui/modal/ModalWrapper.vue
T
Prospector dfb6814095 feat: add unknown .mrpack install warning modal (#5942)
* Update modpack button copy

* Change outlined button style for standard buttons

* add unknown pack warning modal

* implementation

* Redo download toasts

* prepr

* improve hit area of window controls

* implement "don't show again"

* prepr

* duplicate modal ref declarations

* increase spacing of progress items

* address truman review
2026-04-29 16:53:10 +00:00

57 lines
1010 B
Vue

<!-- @deprecated Use NewModal from @modrinth/ui directly. Ads/noblur now handled by injectModalBehavior. -->
<script setup lang="ts">
import { NewModal as Modal } from '@modrinth/ui'
import { useTemplateRef } from 'vue'
const props = defineProps({
header: {
type: String,
default: null,
},
hideHeader: {
type: Boolean,
default: false,
},
closable: {
type: Boolean,
default: true,
},
onHide: {
type: Function,
default() {
return () => {}
},
},
/** @deprecated No longer used — ads are handled by provideModalBehavior */
showAdOnClose: {
type: Boolean,
default: true,
},
})
const modal = useTemplateRef('modal')
defineExpose({
show: (e?: MouseEvent) => {
modal.value?.show(e)
},
hide: () => {
modal.value?.hide()
},
})
</script>
<template>
<Modal
ref="modal"
:header="header"
:closable="closable"
:hide-header="hideHeader"
:on-hide="() => props.onHide?.()"
>
<template #title>
<slot name="title" />
</template>
<slot />
</Modal>
</template>