Skip to content

Commit e5feb80

Browse files
committed
fix: styling
Signed-off-by: Amit Amrutiya <[email protected]>
1 parent 3f05e56 commit e5feb80

File tree

3 files changed

+9
-47
lines changed

3 files changed

+9
-47
lines changed

src/custom/Carousel/style.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const CarouselContainer = styled('div')({
3636
overflowX: 'auto',
3737
scrollBehavior: 'smooth',
3838
scrollSnapType: 'x mandatory',
39-
gap: '1rem',
39+
gap: '0.5rem',
4040
paddingBottom: '1rem',
4141
width: '100%',
4242
msOverflowStyle: 'none',

src/custom/PerformersSection/PerformersSection.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
MainContainer,
1919
RepoTitle,
2020
StatsValue,
21-
StatusLabel,
2221
StyledCard,
2322
Title,
2423
UserNameText
@@ -120,8 +119,7 @@ const StatCardComponent: React.FC<StatCardProps> = ({
120119
id,
121120
onCardClick,
122121
onIconClick,
123-
onAuthorClick,
124-
onStatusClick
122+
onAuthorClick
125123
}) => {
126124
const handleCardClick = () => {
127125
onCardClick(pattern);
@@ -136,19 +134,14 @@ const StatCardComponent: React.FC<StatCardProps> = ({
136134
e.stopPropagation();
137135
onAuthorClick(userid);
138136
};
139-
140-
const handleStatusClick = (e: React.MouseEvent) => {
141-
e.stopPropagation();
142-
onStatusClick(status);
143-
};
144-
137+
const theme = useTheme();
145138
return (
146139
<StyledCard elevation={0} status={status} onClick={handleCardClick}>
147140
<ContentWrapper cardId={id}>
148141
<HeaderSection>
149142
<HeaderTitle>{label}</HeaderTitle>
150143
<IconContainer onClick={(e) => handleIconClick(e, `${countKey}+desc`)}>
151-
<LeaderBoardIcon {...iconXSmall} />
144+
<LeaderBoardIcon {...iconXSmall} fill={theme.palette.common.black} />
152145
</IconContainer>
153146
</HeaderSection>
154147

@@ -159,9 +152,6 @@ const StatCardComponent: React.FC<StatCardProps> = ({
159152
<UserNameText onClick={handleAuthorClick}>by {userName}</UserNameText>
160153
</Box>
161154
</ContentWrapper>
162-
<StatusLabel labelType={status} onClick={handleStatusClick}>
163-
{status}
164-
</StatusLabel>
165155
</StyledCard>
166156
);
167157
};

src/custom/PerformersSection/styles.tsx

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ import { Box, Card, CardContent, Typography } from '../../base';
22
import { DARK_TEAL, styled } from '../../theme';
33
import { getCatalogCardBackground } from '../CustomCatalog/style';
44

5-
interface StatusLabelProps {
6-
labelType?: 'community' | 'official' | string;
7-
}
8-
95
interface ContentWrapperProps {
106
cardId?: string;
117
}
@@ -90,8 +86,10 @@ export const Title = styled(Typography)(({ theme }) => ({
9086
}));
9187

9288
export const StyledCard = styled(Card)<StyledCardProps>(({ theme }) => ({
93-
width: '10rem',
94-
borderRadius: '16px',
89+
width: '200px',
90+
margin: '0.5rem',
91+
height: '100%',
92+
borderRadius: '1rem',
9593
position: 'relative',
9694
overflow: 'hidden',
9795
transition: 'all 0.3s ease-in-out',
@@ -140,9 +138,7 @@ export const ContentWrapper = styled(CardContent)<ContentWrapperProps>(() => ({
140138
display: 'flex',
141139
flexDirection: 'column',
142140
padding: '12px',
143-
'&:last-child': {
144-
paddingBottom: '12px'
145-
}
141+
paddingBottom: '0px !important'
146142
}));
147143

148144
export const HeaderSection = styled(Box)({
@@ -233,30 +229,6 @@ export const CardsContainer = styled(Box)(({ theme }) => ({
233229
paddingBottom: theme.spacing(3)
234230
}));
235231

236-
export const StatusLabel = styled(Box)<StatusLabelProps>(({ labelType, theme }) => ({
237-
position: 'absolute',
238-
bottom: 0,
239-
left: 0,
240-
background:
241-
labelType === 'community'
242-
? 'rgba(122,132,142,.8)'
243-
: labelType === 'official'
244-
? theme.palette.background.cta?.default
245-
: theme.palette.text.brand,
246-
color: labelType === 'official' ? 'black' : 'white',
247-
paddingInline: '1rem',
248-
borderTopRightRadius: '1rem',
249-
fontSize: '0.75rem',
250-
fontWeight: 'bold',
251-
letterSpacing: '0.5px',
252-
textTransform: 'lowercase',
253-
zIndex: 2,
254-
transition: 'all 0.3s ease',
255-
'&:hover': {
256-
filter: 'brightness(1.2)'
257-
}
258-
}));
259-
260232
export const ErrorContainer = styled(Box)(({ theme }) => ({
261233
padding: '1rem',
262234
color: theme.palette.text.error,

0 commit comments

Comments
 (0)