Skip to content

Commit 4fef955

Browse files
committed
feat: add styles for PerformersSection component
Signed-off-by: Amit Amrutiya <[email protected]>
1 parent dd6623b commit 4fef955

File tree

1 file changed

+261
-0
lines changed

1 file changed

+261
-0
lines changed
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
import { Box, Card, CardContent, Typography } from '../../base';
2+
import { DARK_TEAL, styled } from '../../theme';
3+
import { getCatalogCardBackground } from '../CustomCatalog/style';
4+
5+
interface StatusLabelProps {
6+
labelType?: 'community' | 'official' | string;
7+
}
8+
9+
interface ContentWrapperProps {
10+
cardId?: string;
11+
}
12+
13+
interface StyledCardProps {
14+
status?: string;
15+
}
16+
17+
export const ChartDiv = styled(Box)(() => ({
18+
padding: '1rem',
19+
borderRadius: '1rem',
20+
backgroundColor: 'white',
21+
width: '100%',
22+
alignSelf: 'center',
23+
height: '20rem',
24+
marginBottom: '1rem',
25+
boxShadow: '0px 2px 10px rgba(0, 0, 0, 0.2)',
26+
display: 'block',
27+
['@media (max-width:900px)']: {
28+
height: '18rem',
29+
marginInline: '0',
30+
padding: '0.5rem'
31+
}
32+
}));
33+
34+
export const LoadButtonDiv = styled('div')(() => ({
35+
width: '100%',
36+
justifyContent: 'center',
37+
display: 'flex',
38+
alignItems: 'center',
39+
marginTop: '20px'
40+
}));
41+
42+
export const EmptyContainer = styled(Box)(() => ({
43+
display: 'flex',
44+
justifyContent: 'space-evenly',
45+
gap: '2.5rem',
46+
width: '100%'
47+
}));
48+
49+
export const ContentContainer = styled(Box)(() => ({
50+
display: 'flex',
51+
flexWrap: 'wrap',
52+
justifyContent: 'space-evenly',
53+
gap: '2.5rem',
54+
width: '100%'
55+
}));
56+
57+
export const EmptyStateDiv = styled('div')(({ theme }) => ({
58+
backgroundColor: theme.palette.common.white,
59+
textAlign: 'center',
60+
borderRadius: '1rem',
61+
width: '100%',
62+
padding: '1.5rem',
63+
display: 'flex',
64+
flexDirection: 'column',
65+
justifyContent: 'center',
66+
alignItems: 'center'
67+
}));
68+
69+
export const MainContainer = styled(Box)(({ theme }) => ({
70+
background:
71+
theme.palette.mode === 'light'
72+
? theme.palette.background.default
73+
: theme.palette.background.secondary,
74+
paddingTop: theme.spacing(2),
75+
borderRadius: '1rem',
76+
marginBottom: theme.spacing(4),
77+
display: 'flex',
78+
alignItems: 'center',
79+
flexDirection: 'column'
80+
}));
81+
82+
export const Title = styled(Typography)(({ theme }) => ({
83+
fontSize: '1.5rem',
84+
fontWeight: 600,
85+
color: theme.palette.text.default,
86+
paddingLeft: theme.spacing(2),
87+
display: 'flex',
88+
alignItems: 'center',
89+
gap: '0.5rem',
90+
placeSelf: 'flex-start'
91+
}));
92+
93+
export const StyledCard = styled(Card)<StyledCardProps>(({ theme }) => ({
94+
width: 'inherit',
95+
minWidth: '150px',
96+
borderRadius: '16px',
97+
position: 'relative',
98+
overflow: 'hidden',
99+
transition: 'all 0.3s ease-in-out',
100+
background: getCatalogCardBackground(theme.palette.mode === 'light'),
101+
border: '1px solid transparent',
102+
boxShadow: '2px 2px 3px 2px rgb(0, 211, 169, 0.5)',
103+
'&:hover': {
104+
transform: 'translateY(-4px)',
105+
boxShadow: `2px 2px 3px 2px ${theme.palette.text.brand}`,
106+
cursor: 'pointer'
107+
}
108+
}));
109+
110+
export const CardSkeleton = styled('div')(() => ({
111+
display: 'flex',
112+
gap: '10px',
113+
flexWrap: 'nowrap',
114+
justifyContent: 'center',
115+
width: '100%'
116+
}));
117+
118+
export const IconContainer = styled(Box)(() => ({
119+
width: '2rem',
120+
height: '2rem',
121+
padding: '0.25rem',
122+
borderRadius: '8px',
123+
backgroundColor: '#D6FFF7',
124+
display: 'flex',
125+
alignItems: 'center',
126+
justifyContent: 'center',
127+
transition: 'all 0.3s ease',
128+
'& svg': {
129+
transition: 'transform 0.3s ease'
130+
},
131+
'&:hover svg': {
132+
transform: 'scale(1.2)'
133+
},
134+
'& .clone-icon': {
135+
width: '20px',
136+
height: '20px'
137+
}
138+
}));
139+
140+
export const ContentWrapper = styled(CardContent)<ContentWrapperProps>(({ cardId, theme }) => ({
141+
height: '100%',
142+
display: 'flex',
143+
flexDirection: 'column',
144+
padding: theme.spacing(2),
145+
paddingInline: cardId === 'download-icon' ? '12px' : theme.spacing(2),
146+
'&:last-child': {
147+
paddingBottom: theme.spacing(2)
148+
}
149+
}));
150+
151+
export const HeaderSection = styled(Box)({
152+
display: 'flex',
153+
justifyContent: 'space-between',
154+
alignItems: 'flex-start',
155+
marginBottom: '1rem',
156+
gap: '0.6rem'
157+
});
158+
159+
export const HeaderTitle = styled(Typography)(({ theme }) => ({
160+
fontSize: '0.85rem',
161+
fontWeight: 'bold',
162+
color: theme.palette.text.default,
163+
lineHeight: 1.2,
164+
marginTop: '4px',
165+
textTransform: 'uppercase',
166+
letterSpacing: '0.5px'
167+
}));
168+
169+
export const StatsValue = styled(Typography)(({ theme }) => ({
170+
fontSize: '24px',
171+
fontWeight: 700,
172+
color: theme.palette.icon.secondary,
173+
marginBottom: '0.5rem',
174+
lineHeight: 1.2
175+
}));
176+
177+
export const RepoSection = styled(Box)(({ theme }) => ({
178+
marginBlock: '.35rem',
179+
padding: '8px',
180+
borderRadius: '8px',
181+
background: theme.palette.mode === 'light' ? '#f8fafc' : DARK_TEAL,
182+
color: theme.palette.mode === 'light' ? 'rgba(26, 26, 26, .8)' : theme.palette.text.default,
183+
transition: 'background 0.3s ease, filter 0.3s ease',
184+
'&:hover': {
185+
filter: 'brightness(0.98)'
186+
}
187+
}));
188+
189+
export const RepoTitle = styled(Typography)(({ theme }) => ({
190+
fontSize: '0.9rem',
191+
fontWeight: 1000,
192+
color: theme.palette.text.default,
193+
lineHeight: 1.3,
194+
marginBottom: '4px',
195+
display: '-webkit-box',
196+
WebkitLineClamp: 2,
197+
WebkitBoxOrient: 'vertical',
198+
overflow: 'hidden',
199+
textOverflow: 'ellipsis',
200+
height: '2.6em'
201+
}));
202+
203+
export const UserNameText = styled(Typography)(({ theme }) => ({
204+
fontSize: '0.75rem',
205+
color:
206+
theme.palette.mode === 'light'
207+
? theme.palette.text.constant?.disabled
208+
: theme.palette.text.disabled,
209+
marginBottom: '8px',
210+
transition: 'color 0.3s ease',
211+
212+
'&:hover': {
213+
color: theme.palette.text.brand
214+
}
215+
}));
216+
217+
export const CardsContainer = styled(Box)(({ theme }) => ({
218+
display: 'flex',
219+
gap: '18px',
220+
width: '100%',
221+
overflowX: 'auto',
222+
padding: '18px',
223+
background:
224+
theme.palette.mode === 'light'
225+
? theme.palette.background.default
226+
: theme.palette.background.secondary,
227+
borderRadius: '12px',
228+
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.05)',
229+
paddingBottom: theme.spacing(3)
230+
}));
231+
232+
export const StatusLabel = styled(Box)<StatusLabelProps>(({ labelType, theme }) => ({
233+
position: 'absolute',
234+
bottom: 0,
235+
left: 0,
236+
background:
237+
labelType === 'community'
238+
? 'rgba(122,132,142,.8)'
239+
: labelType === 'official'
240+
? theme.palette.background.cta?.default
241+
: theme.palette.text.brand,
242+
color: labelType === 'official' ? 'black' : 'white',
243+
paddingInline: '1rem',
244+
borderTopRightRadius: '1rem',
245+
fontSize: '0.75rem',
246+
fontWeight: 'bold',
247+
letterSpacing: '0.5px',
248+
textTransform: 'lowercase',
249+
zIndex: 2,
250+
transition: 'all 0.3s ease',
251+
'&:hover': {
252+
filter: 'brightness(1.2)'
253+
}
254+
}));
255+
256+
export const ErrorContainer = styled(Box)(({ theme }) => ({
257+
padding: '1rem',
258+
color: theme.palette.text.error,
259+
fontSize: '1rem',
260+
fontWeight: 500
261+
}));

0 commit comments

Comments
 (0)