Skip to content

Commit 1e878a6

Browse files
Merge pull request #42 from code4rena-dev/develop
Minor version - Contest Tile updates
2 parents 658490d + df3e48f commit 1e878a6

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
# Code4rena Components Library
44

5+
## Testing Components Locally
6+
To test the changes you make to your components in a more applicable scenario than storybook, you can install your local repository in any project as if it were already a published package in NPM. You can do so by following the steps below:
7+
8+
1) run `npm run build` on the components library project
9+
2) run `npm install <path_to_local_components_library_folder>` from the project in which you want to test the library
10+
11+
The install command is a one-time-operation. If you make further changes to the library after running the command, all you need to do is run `npm run build` again to see the changes propagated in your other project.
12+
513
## Using Components in your project
614

715
### 1. Installing the library

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code4rena/components-library",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "Code4rena's official components library ",
55
"types": "./dist/lib.d.ts",
66
"exports": {

src/lib/ContestTile/ContestTile.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
max-width: 1036px;
244244
position: relative;
245245
container-type: inline-size;
246+
margin-bottom: 1.5rem;
246247

247248
// Important for stacking context created by container-type css property.
248249
// This makes sure the dropdown always appears above any proceding elements in a list.
@@ -252,12 +253,13 @@
252253

253254
.c4contesttile, .c4contesttile.compact, .c4contesttile.tile--dark, .c4contesttile.compact--dark {
254255
width: 100%;
256+
height: 100%;
255257
max-width: 1036px;
256-
margin-bottom: 1.5rem;
257258

258259
/* Main component wrapper. Outter wrapper is only for declaring component
259260
as a container for container query compatibility */
260261
.container--inner {
262+
height: 100%;
261263
background: $color__n-85;
262264
border: 1px solid $color__n-60;
263265
border-radius: $border-radius__base;
@@ -447,6 +449,9 @@
447449
}
448450

449451
&.default-content {
452+
display: flex;
453+
flex-direction: column;
454+
450455
.body--bounty {
451456
header .content--wrapper .description {
452457
margin-top: 0 !important;
@@ -612,6 +617,10 @@
612617
}
613618
}
614619
}
620+
621+
.footer--contest {
622+
margin-top: auto;
623+
}
615624

616625
.footer--bounty {
617626
&.live {
@@ -706,6 +715,13 @@
706715
color: $color__white;
707716
cursor: pointer;
708717

718+
svg {
719+
min-width: 2rem;
720+
min-height: 2rem;
721+
width: 2rem;
722+
height: 2rem;
723+
}
724+
709725
&:hover {
710726
background: $color__n-80;
711727
}

0 commit comments

Comments
 (0)