2023-03-03 15:54:28 +00:00
|
|
|
<script setup>
|
2023-09-14 13:37:36 +00:00
|
|
|
import { computed } from 'vue';
|
|
|
|
import { StyleService } from '@/Stores/style';
|
|
|
|
import { gradientBgPurplePink, gradientBgDark, gradientBgPinkRed, gradientBgGreenBlue } from '@/colors';
|
2023-03-03 15:54:28 +00:00
|
|
|
|
|
|
|
const props = defineProps({
|
2023-09-14 13:37:36 +00:00
|
|
|
bg: {
|
|
|
|
type: String,
|
2023-11-22 16:06:55 +00:00
|
|
|
required: false,
|
2023-09-14 13:37:36 +00:00
|
|
|
validator: (value) => ['purplePink', 'pinkRed', 'greenBlue'].includes(value),
|
|
|
|
},
|
|
|
|
});
|
2023-03-03 15:54:28 +00:00
|
|
|
|
|
|
|
const colorClass = computed(() => {
|
2023-09-14 13:37:36 +00:00
|
|
|
if (StyleService().darkMode) {
|
|
|
|
return gradientBgDark;
|
|
|
|
}
|
2023-03-03 15:54:28 +00:00
|
|
|
|
2023-09-14 13:37:36 +00:00
|
|
|
switch (props.bg) {
|
|
|
|
case 'purplePink':
|
|
|
|
return gradientBgPurplePink;
|
|
|
|
case 'pinkRed':
|
|
|
|
return gradientBgPinkRed;
|
|
|
|
case 'greenBlue':
|
|
|
|
return gradientBgGreenBlue;
|
2023-11-22 16:06:55 +00:00
|
|
|
default:
|
|
|
|
return 'bg-white text-black dark:bg-slate-900/70 dark:text-white';
|
2023-09-14 13:37:36 +00:00
|
|
|
}
|
|
|
|
|
2023-11-22 16:06:55 +00:00
|
|
|
// return 'bg-white';
|
2023-09-14 13:37:36 +00:00
|
|
|
});
|
2023-03-03 15:54:28 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-09-14 13:37:36 +00:00
|
|
|
<div class="mx-auto md:h-screen flex flex-col justify-center items-center px-6 pt-8 pt:mt-0" :class="colorClass">
|
|
|
|
<slot card-class="w-11/12 md:w-7/12 lg:w-6/12 xl:w-4/12 shadow-2xl" />
|
|
|
|
</div>
|
2023-03-03 15:54:28 +00:00
|
|
|
</template>
|