Skip to content

Commit b5f0f95

Browse files
committed
refactor: rename getBackground to getCatalogCardBackground for clarity
Signed-off-by: Amit Amrutiya <amitamrutiya2210@gmail.com>
1 parent db0bc61 commit b5f0f95

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/custom/CustomCatalog/style.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,16 @@ export const CardBack = styled('div')<CatalogProps>(({ isCatalog }) => ({
348348
})
349349
}));
350350

351-
const getBackground = (isLightMode: boolean) => {
351+
export const getCatalogCardBackground = (isLightMode: boolean) => {
352352
const lightGradient = `linear-gradient(to left bottom, ${WHITESMOKE}, ${GRAY97},white, white, white, white, white, white, white, white, ${WHITESMOKE}, ${GRAY97})`;
353353
const darkGradient = `linear-gradient(to right top, ${DARK_PRIMARY_COLOR}, ${accentGrey[30]}, ${accentGrey[20]}, ${accentGrey[10]}, ${accentGrey[10]}, ${accentGrey[10]}, ${accentGrey[10]}, ${accentGrey[10]}, ${accentGrey[10]}, ${charcoal[20]}, ${charcoal[10]}, black)`;
354354

355355
return isLightMode ? lightGradient : darkGradient;
356356
};
357+
357358
export const CardFront = styled('div')<DesignCardDivProps>(({ shouldFlip, isDetailed, theme }) => {
358359
const isLightMode = theme.palette.mode === 'light';
359-
const background = getBackground(isLightMode);
360+
const background = getCatalogCardBackground(isLightMode);
360361
const boxShadow = `2px 2px 3px 0px ${theme.palette.background.brand?.default}`;
361362

362363
return {
@@ -414,7 +415,7 @@ export const DesignAuthorName = styled('div')(() => ({
414415

415416
export const CatalogEmptyStateDiv = styled('div')(({ theme }) => {
416417
const isLightMode = theme.palette.mode === 'light';
417-
const background = getBackground(isLightMode);
418+
const background = getCatalogCardBackground(isLightMode);
418419
const boxShadow = `2px 2px 3px 0px ${theme.palette.background.brand?.default}`;
419420

420421
return {

0 commit comments

Comments
 (0)