Skip to content

Commit f4699bf

Browse files
Merge pull request #18 from code4rena-dev/develop
Updating Contest Tile to include 2 new variants
2 parents e7cfe15 + 133c334 commit f4699bf

File tree

12 files changed

+620
-366
lines changed

12 files changed

+620
-366
lines changed

.github/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![Jest](https://github.com/code4rena-dev/components-library/actions/workflows/test-runner.yml/badge.svg)](https://github.com/code4rena-dev/components-library/actions/workflows/test-runner.yml)
22

33
# Code4rena Components Library
4-
---
54

65
## Using Components in your project
76

@@ -36,7 +35,7 @@ import { Alert } from "@code4rena/components-library";
3635
### 4. Typescript Support
3736
All components in this library have TypeScript support. Types for all complex component props are also named exports available through the `/types` subdirectory (see example below):
3837
```
39-
import { ButtonSize, ButtonType, ButtonVariant } from "@code4rena/componenets-library/types";
38+
import { ButtonSize, ButtonType, ButtonVariant } from "@code4rena/components-library/types";
4039
4140
<Button
4241
label="Sample Button"

.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 = {

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![Jest](https://github.com/code4rena-dev/components-library/actions/workflows/test-runner.yml/badge.svg)](https://github.com/code4rena-dev/components-library/actions/workflows/test-runner.yml)
22

33
# Code4rena Components Library
4-
---
54

65
## Using Components in your project
76

@@ -36,7 +35,7 @@ import { Alert } from "@code4rena/components-library";
3635
### 4. Typescript Support
3736
All components in this library have TypeScript support. Types for all complex component props are also named exports available through the `/types` subdirectory (see example below):
3837
```
39-
import { ButtonSize, ButtonType, ButtonVariant } from "@code4rena/componenets-library/types";
38+
import { ButtonSize, ButtonType, ButtonVariant } from "@code4rena/components-library/types";
4039
4140
<Button
4241
label="Sample Button"

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.1",
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/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)