Skip to content

Commit 546e843

Browse files
authored
Merge pull request #2831 from starknet-io/add-select-icon-option-drop-down-grant-cms
Fixing icons to have dropdown
2 parents 8a8fa10 + e3e60da commit 546e843

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

_data/pages/grant.yml

+5
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,25 @@ blocks:
1919
- title: Application
2020
description: "Applicants will submit proposals via an Questbook application form
2121
provided by the Starknet Foundation team. "
22+
icon: Application
2223
- title: Internal Evaluation
2324
description: " Each application will be assessed by members of the Starknet
2425
Foundation and Starkware team based on criteria such as potential
2526
impact, innovation, milestones, community engagement & track record,
2627
and embeddedness with the Starknet ecosystem."
28+
icon: Internal Evaluation
2729
- title: Results
2830
description: We plan to communicate decisions on your application within an
2931
approximate two week timeframe.
32+
icon: Results
3033
- title: Onboarding
3134
description: "Upon signing a grant agreement and completing KYC, the Starknet
3235
Foundation will send funds. "
36+
icon: Onboarding
3337
- title: Grant Deliverables
3438
description: "After completion of the work, the Foundation will assess results
3539
and share deliverables (blog post, video, AMA) with the team. "
40+
icon: Post Grant Check-in
3641
- type: container
3742
blocks:
3843
- type: flex_layout

workspaces/cms-config/src/blocks.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,17 @@ export const cardDisplayItem = [
263263
crowdin: false,
264264
},
265265
{
266-
label: "Image",
266+
label: "Icon",
267267
required: false,
268-
name: "image",
269-
widget: "image",
268+
name: "icon",
269+
widget: "select",
270+
options: [
271+
"Application",
272+
"Internal Evaluation",
273+
"Results",
274+
"Onboarding",
275+
"Post Grant Check-in",
276+
],
270277
crowdin: false,
271278
},
272279
] satisfies CmsField[];

workspaces/website/src/components/Card/DisplayCard.tsx

+12-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import { Results } from "@ui/Icons/DisplayCardIcons/Results";
77
import { Heading } from "@ui/Typography/Heading";
88

99
type Props = {
10-
readonly title:
10+
readonly title: string;
11+
readonly icon?:
1112
| "Application"
1213
| "Internal Evaluation"
1314
| "Results"
@@ -25,7 +26,12 @@ const images = {
2526
"Post Grant Check-in": <GrantDeliverables />,
2627
};
2728

28-
export const DisplayCard = (props: Props) => {
29+
export const DisplayCard = ({
30+
title,
31+
icon = "Application",
32+
description,
33+
index,
34+
}: Props) => {
2935
return (
3036
<Box
3137
as="li"
@@ -56,7 +62,7 @@ export const DisplayCard = (props: Props) => {
5662
_dark={{ color: "white" }}
5763
marginBottom={{ base: "16px", md: "0" }}
5864
>
59-
{images[props?.title]}
65+
{images[icon]}
6066
</Box>
6167
</Stack>
6268
<Box flex="1">
@@ -71,7 +77,7 @@ export const DisplayCard = (props: Props) => {
7177
_dark={{ bg: "white", color: "black" }}
7278
color="white"
7379
>
74-
{props.index}
80+
{index}
7581
</Circle>
7682
<Heading
7783
variant="h4"
@@ -81,10 +87,10 @@ export const DisplayCard = (props: Props) => {
8187
color: "button-nav-fg",
8288
}}
8389
>
84-
{props.title}
90+
{title}
8591
</Heading>
8692
</Stack>
87-
<Text>{props.description}</Text>
93+
<Text>{description}</Text>
8894
</Box>
8995
</Stack>
9096
</Box>

0 commit comments

Comments
 (0)