Skip to content

Commit

Permalink
fix: dynamic bg color for some modals
Browse files Browse the repository at this point in the history
  • Loading branch information
Another-DevX committed Jan 27, 2024
1 parent 199f7a9 commit 2f10698
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/_global/BalCard/BalCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="['bal-card', cardClasses]">
<div :class="['bal-card', cardClasses, customBgColor]">
<div
:class="[
'card-container',
Expand Down Expand Up @@ -45,6 +45,7 @@ export default defineComponent({
rightAlignHeader: { type: Boolean, default: false },
exposeOverflow: { type: Boolean, default: false },
overflowYScroll: { type: Boolean, default: false },
customBgColor: { type: String, default: null },
shadow: {
type: String,
default: '',
Expand Down Expand Up @@ -73,7 +74,7 @@ export default defineComponent({
return {
'rounded-lg': !props.square,
'overflow-hidden': !props.exposeOverflow,
['bg-white dark:bg-[#232833]']: true,
[`bg-white dark:bg-gray-${props.darkBgColor}`]: !props.customBgColor,
[`shadow${props.shadow ? '-' : ''}${props.shadow}`]: true,
[borderClasses.value]: !props.noBorder,
'h-full': props.hFull,
Expand Down
4 changes: 3 additions & 1 deletion src/components/_global/BalModal/BalModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Props = {
fireworks?: boolean;
fitContent?: boolean;
blockHideOnClick?: boolean;
customBgColor?: string;
};
/**
Expand Down Expand Up @@ -75,11 +76,12 @@ defineExpose({ hide });
class="content"
>
<BalCard
:customBgColor="customBgColor"
:title="title"
shadow="lg"
:noPad="noPad"
:noContentPad="noContentPad"
class="modal-card"
class="bg-refi-gray modal-card"
noBorder
overflowYScroll
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { Vue3Lottie } from 'vue3-lottie';
import LoadingAnimation from '@/assets/css/animations/RegenerativeLoadingAnimation.json';
</script>
<template>
<BalModal blockHideOnClick fitContent class="w-[100px]" show>
<BalModal
customBgColor="bg-refi-gray"
blockHideOnClick
fitContent
class="w-[100px]"
show
>
<div class="flex flex-col justify-center items-center py-20 px-10 w-full">
<Vue3Lottie
:animationData="LoadingAnimation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { Vue3Lottie } from 'vue3-lottie';
import LoadingAnimation from '@/assets/css/animations/RegenerativeLoadingAnimation.json';
</script>
<template>
<BalModal blockHideOnClick fitContent class="w-[100px]" show>
<BalModal
customBgColor="bg-refi-gray"
blockHideOnClick
fitContent
class="w-[100px]"
show
>
<div class="flex flex-col justify-center items-center py-20 px-10 w-full">
<Vue3Lottie
:animationData="LoadingAnimation"
Expand Down
1 change: 1 addition & 0 deletions src/components/contextual/pages/pool/PoolChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ function addLaggingTimestamps() {
])
);
}
console.debug({ tailwind });
</script>

<template>
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ module.exports = {
complementary: '#7B7B7B',
'complementary-b': '#B6C7D6',
'pill-light': '#E7F4FF',
'refi-gray': '#232833',
},
},
},
Expand Down

0 comments on commit 2f10698

Please sign in to comment.