diff --git a/src/custom/CustomCatalog/custom-card.tsx b/src/custom/CustomCatalog/custom-card.tsx index 06ee8018..c90d78f8 100644 --- a/src/custom/CustomCatalog/custom-card.tsx +++ b/src/custom/CustomCatalog/custom-card.tsx @@ -1,5 +1,5 @@ import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; -import { Avatar, Typography, styled } from '@mui/material'; +import { Avatar, styled } from '@mui/material'; import React, { useEffect, useState } from 'react'; import { Grid } from '../../base'; import { CloneIcon, CommunityClassIcon, OfficialClassIcon, OpenIcon, ShareIcon } from '../../icons'; @@ -27,7 +27,8 @@ import { StyledInnerClassWrapper, TechnologiesSection, TechnologyText, - VersionTag + VersionDiv, + VersionText } from './style'; export const DesignCardUrl = styled('a')(() => ({ @@ -166,6 +167,18 @@ const CustomCatalogCard: React.FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + if (!shouldFlip) { + return ( + + + + {children} + + + + ); + } + return ( @@ -329,11 +342,10 @@ const CustomCatalogCard: React.FC = ({ )} - {cardVersion && ( - - v{cardVersion} - + + v{cardVersion} + )} )} diff --git a/src/custom/CustomCatalog/style.tsx b/src/custom/CustomCatalog/style.tsx index d8a0ce98..863caa41 100644 --- a/src/custom/CustomCatalog/style.tsx +++ b/src/custom/CustomCatalog/style.tsx @@ -212,6 +212,31 @@ export const VersionTag = styled('div')(({ theme }) => ({ maxWidth: 'fit-content' })); +export const VersionDiv = styled('div')(({ theme }) => ({ + display: 'flex', + alignItems: 'center', + gap: '4px', + fontSize: '0.75', + color: theme.palette.text.constant?.white, + position: 'absolute', + bottom: '16px', + left: '16px', + borderRadius: '4px', + background: theme.palette.background.supplementary, + justifyContent: 'center' +})); + +export const VersionText = styled('p')(({ theme }) => ({ + fontSize: '0.75rem', + margin: '0', + padding: '0.25rem .5rem', + lineHeight: '1.5', + textTransform: 'lowercase', + fontWeight: '600', + borderRadius: '4.05px', + color: theme.palette.text.constant?.white +})); + export const FlipCard = styled('div')(() => ({ perspective: '1000px', '&:hover .flipper': { @@ -281,7 +306,6 @@ export const ProfileSection = styled('div')({ }); export const TechnologiesSection = styled('div')(() => ({ - marginBottom: '16px', display: 'flex', flexDirection: 'column', justifyContent: 'center',