Skip to content

Commit e4fae5f

Browse files
authored
chore(retrofunding): changed props in LandingPage (#33)
* chore: changed props in LandingPage 'actionButton' -> 'children' * chore: release
1 parent 97febc3 commit e4fae5f

File tree

14 files changed

+34
-12
lines changed

14 files changed

+34
-12
lines changed

.changeset/large-tools-confess.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@gitcoin/ui": patch
3+
---
4+
5+
(retrofunding): changed props in LandingPage "actionButton" -> "children"

.changeset/pre.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"grumpy-garlics-rescue",
1717
"hip-impalas-eat",
1818
"kind-pens-build",
19+
"large-tools-confess",
1920
"lucky-comics-thank",
2021
"rare-plants-work",
2122
"rich-phones-live",

packages/config/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @gitcoin/config
22

3+
## 0.0.0-beta.17
4+
35
## 0.0.0-beta.16
46

57
## 0.0.0-beta.15

packages/config/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitcoin/config",
3-
"version": "0.0.0-beta.16",
3+
"version": "0.0.0-beta.17",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/gitcoinco/core",

packages/themes/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @gitcoin/themes
22

3+
## 0.0.0-beta.17
4+
35
## 0.0.0-beta.16
46

57
## 0.0.0-beta.15

packages/themes/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitcoin/themes",
3-
"version": "0.0.0-beta.16",
3+
"version": "0.0.0-beta.17",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/gitcoinco/core",

packages/types/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @gitcoin/types
22

3+
## 0.0.0-beta.17
4+
35
## 0.0.0-beta.16
46

57
## 0.0.0-beta.15

packages/types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitcoin/types",
3-
"version": "0.0.0-beta.16",
3+
"version": "0.0.0-beta.17",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/gitcoinco/core",

packages/ui/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @gitcoin/ui
22

3+
## 0.0.0-beta.17
4+
5+
### Patch Changes
6+
7+
- (retrofunding): changed props in LandingPage "actionButton" -> "children"
8+
39
## 0.0.0-beta.16
410

511
### Patch Changes

packages/ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitcoin/ui",
3-
"version": "0.0.0-beta.16",
3+
"version": "0.0.0-beta.17",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/gitcoinco/core",

packages/ui/src/features/retrofunding/components/Landing/Landing.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ export const VoteLanding: Story = {
2525
roundName: "Cool retro round",
2626
roundDescription:
2727
"Lorem ipsum dolor sit amet consectetur. Non laoreet nulla blandit at integer. Consectetur adipiscing magna sollicitudin arcu elementum nunc. Elit fermentum.",
28-
actionButton: <ConnectButton type="vote" onClick={handleConnect} />,
28+
children: <ConnectButton type="vote" onClick={handleConnect} />,
2929
},
3030
};
3131

3232
export const AdminLanding: Story = {
3333
args: {
3434
type: "admin",
35-
actionButton: <ConnectButton type="admin" onClick={handleConnect} />,
35+
children: <ConnectButton type="admin" onClick={handleConnect} />,
3636
},
3737
};

packages/ui/src/features/retrofunding/components/Landing/LandingPage.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import { PropsWithChildren } from "react";
2+
13
import { match } from "ts-pattern";
24

35
import { RetrofundingIcon, VoteIcon } from "@/assets/icons";
46

57
interface BaseLandingProps {
68
type: "vote" | "admin";
7-
actionButton?: React.ReactNode;
9+
children: React.ReactNode;
810
}
911
export interface VoteSpecificProps extends BaseLandingProps {
1012
roundName: string;
@@ -22,7 +24,7 @@ export const LandingPage = ({ type, ...props }: LandingProps) => {
2224
.exhaustive();
2325
};
2426

25-
const VoteLanding = ({ roundName, roundDescription, actionButton }: VoteSpecificProps) => {
27+
const VoteLanding = ({ roundName, roundDescription, children }: VoteSpecificProps) => {
2628
return (
2729
<div className="background-grid-purple flex flex-col items-center justify-center">
2830
<div className="flex max-w-[564px] flex-col items-center gap-8 ">
@@ -31,18 +33,18 @@ const VoteLanding = ({ roundName, roundDescription, actionButton }: VoteSpecific
3133
<div className="text-2xl font-medium">{roundName}</div>
3234
<div className="text-[16px]/[28px]">{roundDescription}</div>
3335
</div>
34-
{actionButton}
36+
{children}
3537
</div>
3638
</div>
3739
);
3840
};
3941

40-
const AdminLanding = ({ actionButton }: AdminSpecificProps) => {
42+
const AdminLanding = ({ children }: AdminSpecificProps) => {
4143
return (
4244
<div className="background-grid-green flex flex-col justify-center">
4345
<div className="flex flex-col items-center gap-10">
4446
<RetrofundingIcon />
45-
{actionButton}
47+
{children}
4648
</div>
4749
</div>
4850
);

packages/utils/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @gitcoin/utils
22

3+
## 0.0.0-beta.17
4+
35
## 0.0.0-beta.16
46

57
## 0.0.0-beta.15

packages/utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitcoin/utils",
3-
"version": "0.0.0-beta.16",
3+
"version": "0.0.0-beta.17",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/gitcoinco/core",

0 commit comments

Comments
 (0)