Skip to content

Commit 133c334

Browse files
Merge pull request #17 from code4rena-dev/compact-contest-tile
Compact Contest Tile
2 parents f399236 + 4005c25 commit 133c334

File tree

11 files changed

+619
-363
lines changed

11 files changed

+619
-363
lines changed

.storybook/preview.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const wrapperStyle = {
99
justifyContent: "center",
1010
alignItems: "center",
1111
padding: "0rem 1rem",
12+
marginTop: "2rem",
1213
};
1314

1415
const preview: Preview = {

package-lock.json

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code4rena/components-library",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Code4rena's official components library ",
55
"types": "./dist/lib.d.ts",
66
"exports": {
@@ -58,7 +58,7 @@
5858
"jest": "^29.6.2",
5959
"jest-environment-jsdom": "^29.6.2",
6060
"jest-transformer-svg": "^2.0.1",
61-
"sass": "^1.63.6",
61+
"sass": "^1.69.5",
6262
"storybook": "^7.0.26",
6363
"ts-node": "^10.9.1",
6464
"tslib": "^2.6.0",
@@ -68,6 +68,7 @@
6868
},
6969
"dependencies": {
7070
"clsx": "^1.2.1",
71+
"container-query-polyfill": "^1.0.2",
7172
"date-fns": "^2.30.0",
7273
"luxon": "^3.3.0",
7374
"react-avatar": "^5.0.3",

src/lib/Card/Card.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
display: flex;
5555
justify-content: center;
5656
align-items: center;
57-
object-fit: cover;
5857
aspect-ratio: 1/1;
5958
order: 1;
6059

6160
img {
6261
height: 100%;
6362
width: 100%;
63+
object-fit: cover;
6464
}
6565

6666
&--l {

src/lib/ContestStatus/ContestStatus.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
justify-content: center;
88
gap: 0.75rem;
99
color: $color__white;
10+
font-size: $font-size__text;
1011

1112
.statusindicator {
1213
width: $spacing__s;
@@ -25,4 +26,6 @@
2526
background: $color__green;
2627
}
2728
}
29+
30+
p { margin: 0; }
2831
}

src/lib/ContestStatus/ContestStatus.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export const ContestStatus: React.FC<ContestStatusProps> = ({
3030
status && (
3131
<div id={id ?? undefined} className={`c4conteststatus ${className}`}>
3232
<div className={`${styling}`} />
33-
{status === Status.UPCOMING && "Soon"}
34-
{status === Status.LIVE && "Live"}
35-
{status === Status.ENDED && "Ended"}
36-
{!status && "-"}
33+
{status === Status.UPCOMING && <p>Soon</p>}
34+
{status === Status.LIVE && <p>Live</p>}
35+
{status === Status.ENDED && <p>Ended</p>}
36+
{!status && <p>-</p>}
3737
</div>
3838
)
3939
);

0 commit comments

Comments
 (0)