Compare commits

..

1 Commits

Author SHA1 Message Date
1875c319f9 add dark mode in baseFileUploader 2023-03-23 17:54:02 +05:30
3 changed files with 16 additions and 14 deletions

View File

@ -21,6 +21,7 @@
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'"
> >
@ -49,7 +50,7 @@
<a <a
href="#" href="#"
class="absolute z-30 bg-white rounded-full -bottom-3 -right-3 group" class="absolute z-30 bg-white rounded-full -bottom-3 -right-3 group dark:bg-gray-900"
@click.prevent.stop="onBrowse" @click.prevent.stop="onBrowse"
> >
<BaseIcon <BaseIcon
@ -95,7 +96,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" class="flex w-full h-full border border-gray-200 rounded dark:border-gray-600"
> >
<img <img
v-if="localFiles[0].image" v-if="localFiles[0].image"
@ -169,10 +170,11 @@
-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" /> <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black dark:text-white" />
</a> </a>
</div> </div>
@ -195,6 +197,7 @@
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
> >
@ -270,6 +273,7 @@
-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)"
> >
@ -293,6 +297,7 @@
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
> >
@ -368,10 +373,11 @@
-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" /> <BaseIcon name="XIcon" class="h-4 text-xl leading-6 text-black dark:text-white" />
</a> </a>
</a> </a>
</div> </div>

View File

@ -7,7 +7,7 @@
<Switch <Switch
v-model="enabled" v-model="enabled"
:class="enabled ? 'bg-primary-500' : 'bg-gray-300 dark:bg-gray-900'" :class="enabled ? 'bg-primary-500' : 'bg-gray-300'"
class=" class="
relative relative
inline-flex inline-flex
@ -21,11 +21,7 @@
v-bind="$attrs" v-bind="$attrs"
> >
<span <span
:class=" :class="enabled ? 'translate-x-6' : 'translate-x-1'"
enabled
? 'translate-x-6 dark:bg-white'
: 'translate-x-1 dark:bg-gray-500'
"
class=" class="
inline-block inline-block
w-4 w-4

View File

@ -5,12 +5,12 @@
<div class="flex flex-col"> <div class="flex flex-col">
<SwitchLabel <SwitchLabel
as="p" as="p"
class="p-0 mb-1 text-sm leading-snug text-black font-medium dark:text-white" class="p-0 mb-1 text-sm leading-snug text-black font-medium"
passive passive
> >
{{ title }} {{ title }}
</SwitchLabel> </SwitchLabel>
<SwitchDescription class="text-sm text-gray-500 dark:text-gray-400"> <SwitchDescription class="text-sm text-gray-500">
{{ description }} {{ description }}
</SwitchDescription> </SwitchDescription>
</div> </div>
@ -18,7 +18,7 @@
:disabled="disabled" :disabled="disabled"
:model-value="modelValue" :model-value="modelValue"
:class="[ :class="[
modelValue ? 'bg-primary-500' : 'bg-gray-200 dark:bg-gray-900', modelValue ? 'bg-primary-500' : 'bg-gray-200',
'ml-4 relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500', 'ml-4 relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500',
]" ]"
@update:modelValue="onUpdate" @update:modelValue="onUpdate"
@ -26,7 +26,7 @@
<span <span
aria-hidden="true" aria-hidden="true"
:class="[ :class="[
modelValue ? 'translate-x-5 dark:bg-white' : 'translate-x-0 dark:bg-gray-500', modelValue ? 'translate-x-5' : 'translate-x-0',
'inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition ease-in-out duration-200', 'inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition ease-in-out duration-200',
]" ]"
/> />