Compare commits

..

1 Commits

Author SHA1 Message Date
7599681050 add dark mode in base dialog component 2023-03-23 15:07:13 +05:30
2 changed files with 21 additions and 17 deletions

View File

@ -30,8 +30,13 @@
leave-to="opacity-0" leave-to="opacity-0"
> >
<DialogOverlay <DialogOverlay
class="fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75" class="fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75 dark:backdrop-blur-xl dark:bg-gray-900/80"
>
<BaseDarkHighlight
class="!bg-highlight/[.17] !top-1/2 h-60 -translate-y-1/2 mt-5"
:class="dialogSizeClasses"
/> />
</DialogOverlay>
</TransitionChild> </TransitionChild>
<!-- This element is to trick the browser into centering the modal contents. --> <!-- This element is to trick the browser into centering the modal contents. -->
@ -64,6 +69,11 @@
shadow-xl shadow-xl
sm:my-8 sm:align-middle sm:w-full sm:p-6 sm:my-8 sm:align-middle sm:w-full sm:p-6
relative relative
dark:backdrop-blur-xl
dark:shadow-glass
dark:border
dark:border-white/10
dark:bg-gray-800
" "
:class="dialogSizeClasses" :class="dialogSizeClasses"
> >
@ -80,31 +90,31 @@
rounded-full rounded-full
" "
:class="{ :class="{
'bg-green-100': dialogStore.variant === 'primary', 'bg-green-100 dark:bg-primary-500': dialogStore.variant === 'primary',
'bg-red-100': dialogStore.variant === 'danger', 'bg-red-100 dark:bg-red-500': dialogStore.variant === 'danger',
}" }"
> >
<BaseIcon <BaseIcon
v-if="dialogStore.variant === 'primary'" v-if="dialogStore.variant === 'primary'"
name="CheckIcon" name="CheckIcon"
class="w-6 h-6 text-green-600" class="w-6 h-6 text-green-600 dark:text-white"
/> />
<BaseIcon <BaseIcon
v-else v-else
name="ExclamationIcon" name="ExclamationIcon"
class="w-6 h-6 text-red-600" class="w-6 h-6 text-red-600 dark:text-white"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>
<div class="mt-3 text-center sm:mt-5"> <div class="mt-3 text-center sm:mt-5">
<DialogTitle <DialogTitle
as="h3" as="h3"
class="text-lg font-medium leading-6 text-gray-900" class="text-lg font-medium leading-6 text-gray-900 dark:text-white"
> >
{{ dialogStore.title }} {{ dialogStore.title }}
</DialogTitle> </DialogTitle>
<div class="mt-2"> <div class="mt-2">
<p class="text-sm text-gray-500"> <p class="text-sm text-gray-500 dark:text-gray-400">
{{ dialogStore.message }} {{ dialogStore.message }}
</p> </p>
</div> </div>

View File

@ -21,7 +21,6 @@
group group
min-h-[100px] min-h-[100px]
bg-gray-50 bg-gray-50
dark:bg-gray-700 dark:border-gray-600
" "
:class="avatar ? 'w-32 h-32' : 'w-full'" :class="avatar ? 'w-32 h-32' : 'w-full'"
> >
@ -50,7 +49,7 @@
<a <a
href="#" href="#"
class="absolute z-30 bg-white rounded-full -bottom-3 -right-3 group dark:bg-gray-900" class="absolute z-30 bg-white rounded-full -bottom-3 -right-3 group"
@click.prevent.stop="onBrowse" @click.prevent.stop="onBrowse"
> >
<BaseIcon <BaseIcon
@ -96,7 +95,7 @@
<div <div
v-else-if="localFiles.length && avatar && !multiple" v-else-if="localFiles.length && avatar && !multiple"
class="flex w-full h-full border border-gray-200 rounded dark:border-gray-600" class="flex w-full h-full border border-gray-200 rounded"
> >
<img <img
v-if="localFiles[0].image" v-if="localFiles[0].image"
@ -170,11 +169,10 @@
-right-3 -right-3
group group
hover:border-gray-300 hover:border-gray-300
dark:border-gray-600 dark:bg-gray-900 dark:hover:border-gray-700
" "
@click.prevent.stop="onAvatarRemove(localFiles[0])" @click.prevent.stop="onAvatarRemove(localFiles[0])"
> >
<BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black dark:text-white" /> <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black" />
</a> </a>
</div> </div>
@ -197,7 +195,6 @@
hover:border-gray-500 hover:border-gray-500
relative relative
max-w-md max-w-md
dark:border-gray-600 dark:bg-transparent dark:hover:border-gray-700
" "
@click.prevent @click.prevent
> >
@ -273,7 +270,6 @@
-right-3 -right-3
group group
hover:border-gray-300 hover:border-gray-300
dark:border-gray-600 dark:bg-gray-900 dark:hover:border-gray-700
" "
@click.prevent.stop="onFileRemove(index)" @click.prevent.stop="onFileRemove(index)"
> >
@ -297,7 +293,6 @@
hover:border-gray-500 hover:border-gray-500
relative relative
max-w-md max-w-md
dark:border-gray-600 dark:bg-gray-800 dark:hover:border-gray-700
" "
@click.prevent @click.prevent
> >
@ -373,11 +368,10 @@
-right-3 -right-3
group group
hover:border-gray-300 hover:border-gray-300
dark:border-gray-600 dark:bg-gray-900 dark:hover:border-gray-700
" "
@click.prevent.stop="onFileRemove(index)" @click.prevent.stop="onFileRemove(index)"
> >
<BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black dark:text-white" /> <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black" />
</a> </a>
</a> </a>
</div> </div>