Skip to content

Commit 7660a18

Browse files
authored
Accept props in GraphQLConfCard and use 2025 YT link (#2089)
1 parent 93d9574 commit 7660a18

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

.changeset/rich-dodos-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@theguild/components': minor
3+
---
4+
5+
Accept props in GraphQLConfCard and use 2025 YT link'

packages/components/src/components/hive-navigation/graphql-conf-card.tsx

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,34 @@ import { NavigationMenuLink } from './navigation-menu';
55

66
export interface GraphQLConfCardProps {
77
image: StaticImageData;
8+
href?: string;
9+
title?: string;
10+
details?: string;
11+
description?: string;
12+
callToAction?: string;
813
}
9-
export function GraphQLConfCard({ image }: GraphQLConfCardProps) {
14+
export function GraphQLConfCard({
15+
image,
16+
href = 'https://youtube.com/playlist?list=PL43V96KpNj7MKvDbnyOUrRv0k1gCODtjW&si=nOiETn8J21mYA9pm',
17+
title = 'GraphQLConf 2025',
18+
details = 'September 08-10 | Amsterdam, NL',
19+
description = 'The official GraphQL conference hosted by GraphQL Foundation.',
20+
callToAction = 'Watch The Guild at GraphQLConf 2025',
21+
}: GraphQLConfCardProps) {
1022
return (
11-
<NavigationMenuLink
12-
href="https://www.youtube.com/playlist?list=PL43V96KpNj7OMvmfL0WFKP6LpoboM8Hde"
13-
className="group w-[358px]"
14-
>
23+
<NavigationMenuLink href={href} className="group w-[358px]">
1524
<Image alt="" src={image} width={358} height={200} />
1625
<strong className="mt-6 block text-xl font-medium leading-7 text-green-1000 dark:text-neutral-100">
17-
GraphQLConf 2025
26+
{title}
1827
</strong>
1928
<p className="mt-4 text-sm font-medium leading-5 text-green-800 dark:text-neutral-200">
20-
September 08-10 | Amsterdam, NL
29+
{details}
2130
</p>
2231
<p className="mt-2 text-sm font-normal leading-5 text-green-800 dark:text-neutral-200">
23-
The official GraphQL conference hosted by GraphQL Foundation.
32+
{description}
2433
</p>
2534
<span className="mt-6 flex items-center gap-2 rounded-lg font-medium text-green-800 transition-colors group-hover:text-green-1000 dark:text-neutral-200 dark:group-hover:text-neutral-100">
26-
Watch The Guild at GraphQLConf 2025
35+
{callToAction}
2736
<ArrowIcon />
2837
</span>
2938
</NavigationMenuLink>

packages/components/src/components/hive-navigation/index.stories.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,7 @@ export const Company: StoryObj = {
177177
return (
178178
<NavigationMenu>
179179
<CompanyMenu>
180-
<GraphQLConfCard
181-
image={{
182-
height: 750,
183-
width: 1200,
184-
src: graphQLConfLocalImage,
185-
}}
186-
/>
180+
<GraphQLConfCard image={graphQLConfLocalImage} />
187181
</CompanyMenu>
188182
</NavigationMenu>
189183
);

0 commit comments

Comments
 (0)