Skip to content

Commit 6148b0a

Browse files
authored
Merge pull request #94 from code4rena-dev/samuus/audit-status-icon
[audit status] use dot icon with no space
2 parents b2c01c6 + de744ba commit 6148b0a

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

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": "4.5.6",
3+
"version": "4.5.7",
44
"description": "Code4rena's official components library ",
55
"types": "./dist/lib.d.ts",
66
"exports": {

src/lib/ContestStatus/AuditStatusSection.tsx

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,39 @@ const getAuditStatusColor = (status: AuditStatus | null) => {
6666
}
6767
};
6868

69+
const DotNoPaddingStrokeIcon = ({
70+
className,
71+
color = "var(--color__text-primary)",
72+
strokeColor = "var(--color__border-secondary)",
73+
width = 16,
74+
height = 16,
75+
}: {
76+
className?: string;
77+
color?: string;
78+
strokeColor?: string;
79+
width?: number;
80+
height?: number;
81+
}) => (
82+
<svg
83+
width={width}
84+
height={height}
85+
fill="none"
86+
className={className}
87+
viewBox="0 0 8 8"
88+
xmlns="http://www.w3.org/2000/svg"
89+
>
90+
<rect
91+
x=".5"
92+
y=".5"
93+
width="7"
94+
height="7"
95+
rx="3.5"
96+
fill={color}
97+
stroke={strokeColor}
98+
/>
99+
</svg>
100+
);
101+
69102
export const AuditStatusSection = ({
70103
auditStatus,
71104
startTime,
@@ -128,7 +161,7 @@ export const AuditStatusSection = ({
128161
<div className="details">
129162
{iconColor && (
130163
<div className="audit-tile__status__icon">
131-
<Icon name="dot" color={iconColor} />
164+
<DotNoPaddingStrokeIcon color={iconColor} strokeColor={iconColor} />
132165
</div>
133166
)}
134167
<div

src/lib/ContestTile/ContestTile.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@
175175
align-items: center;
176176
gap: 0.5rem;
177177
flex: 1 0 0;
178-
padding-left: 0.5rem;
178+
padding-left: 1rem;
179179
border-right: 1px solid hsla(0, 0%, 100%, 0.4);
180180

181181
.audit-tile__status__icon {
182-
width: 1.1rem;
183-
height: 1.1rem;
184-
border-radius: 12.5rem;
182+
display: flex;
183+
width: 0.5rem;
184+
height: 0.5rem;
185185

186186
svg {
187187
width: 100%;
@@ -685,13 +685,13 @@
685685
align-items: center;
686686
gap: 0.5rem;
687687
flex: 1 0 0;
688-
padding-left: 0.5rem;
688+
padding-left: 1rem;
689689
border-right: 1px solid $color__n-60;
690690

691691
.audit-tile__status__icon {
692-
width: 1.1rem;
693-
height: 1.1rem;
694-
border-radius: 12.5rem;
692+
display: flex;
693+
width: 0.5rem;
694+
height: 0.5rem;
695695

696696
svg {
697697
width: 100%;

src/lib/ContestTile/DefaultTemplate.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ import wolfbotIcon from "../../../public/icons/wolfbot.svg";
44
import { BaseContestSchedule, BountyTileData, ContestSchedule, ContestTileData, ContestTileProps, ContestTileVariant } from "./ContestTile.types";
55
import { DropdownLink, Status, TagSize, TagVariant } from "../types";
66
import { ContestStatus } from "../ContestStatus";
7-
import { ContestCountdown, Countdown } from "./ContestTile";
7+
import { Countdown } from "./ContestTile";
88
import { getDates, getContestSchedule } from "../../utils/time";
99
import { isBefore } from "date-fns";
1010
import { Dropdown } from "../Dropdown";
1111
import { Icon } from "../Icon";
1212
import { Tag } from "../Tag";
1313
import { AuditStatusSection } from "../ContestStatus/AuditStatusSection";
1414

15-
1615
export default function DefaultTemplate({
1716
variant,
1817
htmlId,

0 commit comments

Comments
 (0)