Remove _props abstraction (fixes )

This commit is contained in:
thepaperpilot 2024-10-20 06:27:24 -05:00
parent 1e5411d279
commit 6c8dd66677
10 changed files with 51 additions and 60 deletions
src/components/modals

View file

@ -41,22 +41,22 @@
<script setup lang="ts">
import type { FeatureNode } from "game/layers";
import { computed, ref, toRefs, unref } from "vue";
import { computed, ref } from "vue";
import Context from "../Context.vue";
const _props = defineProps<{
const props = defineProps<{
modelValue: boolean;
preventClosing?: boolean;
width?: string;
}>();
const props = toRefs(_props);
const emit = defineEmits<{
(e: "update:modelValue", value: boolean): void;
}>();
const isOpen = computed(() => unref(props.modelValue) || isAnimating.value);
const isOpen = computed(() => props.modelValue || isAnimating.value);
function close() {
if (unref(props.preventClosing) !== true) {
if (props.preventClosing !== true) {
emit("update:modelValue", false);
}
}