prettier fixes #16

This commit is contained in:
Michael Dausmann
2023-10-24 21:18:03 +11:00
parent dc9d64ebf5
commit a7f8c37f99
56 changed files with 1706 additions and 935 deletions

View File

@@ -21,18 +21,18 @@
// props for which buttons to show
interface Props {
showOk?: boolean
showCancel?: boolean
showOk?: boolean;
showCancel?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
showOk: true,
showCancel: false,
})
showCancel: false
});
// open event (exposed to parent)
const open = () => {
modalIsVisible.value = true;
}
};
defineExpose({ open });
// close events emitted on modal close
@@ -40,16 +40,20 @@
const closeOk = () => {
emit('closeOk');
modalIsVisible.value = false;
}
};
const closeCancel = () => {
emit('closeCancel');
modalIsVisible.value = false;
}
};
</script>
<template>
<!-- the input controls the visibility of the modal (css shenanigans) the v-model allows me to control it in turn from the wrapper component -->
<input type="checkbox" id="my-modal" class="modal-toggle" v-model="modalIsVisible" />
<input
type="checkbox"
id="my-modal"
class="modal-toggle"
v-model="modalIsVisible" />
<div class="modal">
<div class="modal-box">
<slot />
@@ -64,4 +68,4 @@
</div>
</div>
</div>
</template>
</template>