From 23b5cc80ba02936659564dd03b173d3214ce5978 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Tue, 13 Sep 2022 19:59:06 +1000
Subject: Use Vue Composition API and ESLint

---
 src/components/LoadingModal.vue | 30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)

(limited to 'src/components/LoadingModal.vue')

diff --git a/src/components/LoadingModal.vue b/src/components/LoadingModal.vue
index ee8d699..abd405c 100644
--- a/src/components/LoadingModal.vue
+++ b/src/components/LoadingModal.vue
@@ -8,26 +8,20 @@
 </div>
 </template>
 
-<script lang="ts">
-import {defineComponent, PropType} from 'vue';
+<script setup lang="ts">
+import {computed, PropType} from 'vue';
 import LoaderIcon from './icon/LoaderIcon.vue';
 import {UiOptions} from '../lib';
 
-export default defineComponent({
-	props: {
-		msg: {type: String, required: true},
-		uiOpts: {type: Object as PropType<UiOptions>, required: true},
-	},
-	computed: {
-		styles(): Record<string,string> {
-			return {
-				color: this.uiOpts.textColor,
-				backgroundColor: this.uiOpts.bgColorDark2,
-				borderRadius: this.uiOpts.borderRadius + 'px',
-				boxShadow: this.uiOpts.shadowNormal,
-			};
-		},
-	},
-	components: {LoaderIcon, },
+const props = defineProps({
+	msg: {type: String, required: true},
+	uiOpts: {type: Object as PropType<UiOptions>, required: true},
 });
+
+const styles = computed(() => ({
+	color: props.uiOpts.textColor,
+	backgroundColor: props.uiOpts.bgColorDark2,
+	borderRadius: props.uiOpts.borderRadius + 'px',
+	boxShadow: props.uiOpts.shadowNormal,
+}));
 </script>
-- 
cgit v1.2.3

