-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New plugin search color scheme (#1756)
Co-authored-by: Dimitri POSTOLOV <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f610013
commit 59fdf4e
Showing
43 changed files
with
3,730 additions
and
1,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@theguild/components": patch | ||
--- | ||
dependencies updates: | ||
- Removed dependency [`@theguild/[email protected]` ↗︎](https://www.npmjs.com/package/@theguild/tailwind-config/v/0.5.0) (from `dependencies`) | ||
- Added dependency [`@theguild/tailwind-config@0.6.0-alpha-20241106003557-2c94714753ba2342f442f836b4683119985ee2c5` ↗︎](https://www.npmjs.com/package/@theguild/tailwind-config/v/0.6.0) (to `peerDependencies`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@theguild/components': minor | ||
--- | ||
|
||
Add green colorScheme to MarketplaceSearch and MarketplaceList, change display to grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/components/src/components/explore-main-product-cards.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { hiveThemeDecorator } from '../../../../.storybook/hive-theme-decorator'; | ||
import { | ||
ExploreMainProductCards, | ||
ExploreMainProductCardsProps, | ||
} from './explore-main-product-cards'; | ||
|
||
export default { | ||
title: 'Hive/ExploreMainProductCards', | ||
component: ExploreMainProductCards, | ||
decorators: [hiveThemeDecorator], | ||
parameters: { | ||
forcedLightMode: true, | ||
}, | ||
} satisfies Meta; | ||
|
||
export const Default: StoryObj<ExploreMainProductCardsProps> = { | ||
name: 'ExploreMainProductCards', | ||
}; |
37 changes: 37 additions & 0 deletions
37
packages/components/src/components/explore-main-product-cards.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { HTMLAttributes } from 'react'; | ||
import { cn } from '../cn'; | ||
import { PRODUCTS } from '../products'; | ||
import { Heading } from './heading'; | ||
import { ArrowIcon } from './icons'; | ||
import { TextLink } from './text-link'; | ||
import { MainProductCard } from './tools-and-libraries-cards'; | ||
|
||
export interface ExploreMainProductCardsProps extends HTMLAttributes<HTMLDivElement> {} | ||
|
||
export function ExploreMainProductCards({ className, ...rest }: ExploreMainProductCardsProps) { | ||
return ( | ||
<section | ||
className={cn( | ||
'relative isolate flex flex-wrap gap-6 px-4 py-6 lg:gap-12 lg:py-24 xl:px-[120px]', | ||
className, | ||
)} | ||
{...rest} | ||
> | ||
<div className="[@media(min-width:1490px)]:w-[293px]"> | ||
<Heading as="h2" size="xs" className="text-pretty"> | ||
Explore Hive 360° GraphQL Ecosystem to reach full potential | ||
</Heading> | ||
{/* TODO: Replace with a link to the Libraries page */} | ||
<TextLink href="https://github.com/the-guild-org" className="mt-4 lg:mt-6"> | ||
Learn more | ||
<ArrowIcon /> | ||
</TextLink> | ||
</div> | ||
<ul className="-mx-12 -my-2 flex shrink-0 grow gap-[22px] overflow-auto px-12 py-2 [@media(max-width:1490px)]:w-full [@media(min-width:1490px)]:overflow-visible [&>:nth-child(n+4)]:[@media(min-width:1490px)]:hidden"> | ||
{[PRODUCTS.HIVE, PRODUCTS.YOGA, PRODUCTS.MESH, PRODUCTS.CODEGEN].map(product => ( | ||
<MainProductCard key={product.name} as="li" product={product} /> | ||
))} | ||
</ul> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
packages/components/src/components/marketplace-list.stories.ts
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
packages/components/src/components/marketplace-list.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { hiveThemeDecorator } from '../../../../.storybook/hive-theme-decorator'; | ||
import { MarketplaceList } from './marketplace-list'; | ||
import { Default as MarketplaceSearchDefaultStory } from './marketplace-search.stories'; | ||
|
||
const meta: Meta<typeof MarketplaceList> = { | ||
title: 'Components/MarketplaceList', | ||
component: MarketplaceList, | ||
argTypes: { | ||
title: { | ||
name: 'Title', | ||
}, | ||
placeholder: { | ||
name: 'No Results Placeholder', | ||
}, | ||
pagination: { | ||
name: 'Products / Page', | ||
}, | ||
items: { | ||
name: 'Items', | ||
}, | ||
colorScheme: { | ||
control: { | ||
type: 'select', | ||
}, | ||
options: ['green', 'black'], | ||
}, | ||
}, | ||
decorators: [ | ||
hiveThemeDecorator, | ||
Story => ( | ||
<div className="p-2"> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof MarketplaceList>; | ||
|
||
export const Default: Story = { | ||
name: 'MarketplaceList', | ||
args: { | ||
title: 'Trending & Last Update', | ||
placeholder: 'There are no items available...', | ||
pagination: 4, | ||
items: MarketplaceSearchDefaultStory.args?.primaryList?.items ?? [], | ||
}, | ||
}; | ||
|
||
export const Green: Story = { | ||
name: 'MarketplaceList Green', | ||
args: { ...Default.args, colorScheme: 'green' }, | ||
}; |
Oops, something went wrong.