Skip to content

Commit 2304215

Browse files
authored
Merge pull request #348 from storybookjs/sidnioulz/external-framework-consolidation
External framework consolidation
2 parents bdcbe4e + 6d7e997 commit 2304215

File tree

7 files changed

+125
-0
lines changed

7 files changed

+125
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import Image from 'next/image';
2+
import Link from 'next/link';
3+
4+
export function CommunityRenderers() {
5+
return (
6+
<div className="mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">
7+
<Card
8+
href="https://analogjs.org/docs/integrations/storybook"
9+
logo="logo-analog.svg"
10+
title="Analog"
11+
subtitle="with Vite"
12+
/>
13+
<Card
14+
href="https://storybook.nuxtjs.org/"
15+
logo="logo-nuxt.svg"
16+
title="Nuxt"
17+
subtitle="with Vite"
18+
/>
19+
<Card
20+
href="https://github.com/solidjs-community/storybook"
21+
logo="logo-solidjs.svg"
22+
title="SolidJS"
23+
subtitle="with Vite"
24+
/>
25+
<Card
26+
href="https://storybook.rsbuild.dev/guide/framework/react.html"
27+
logo="logo-react.svg"
28+
title="React"
29+
subtitle="with Rspack / Rsbuild"
30+
/>
31+
<Card
32+
href="https://storybook.rsbuild.dev/guide/framework/vue.html"
33+
logo="logo-vue.svg"
34+
title="Vue"
35+
subtitle="with Rspack / Rsbuild"
36+
/>
37+
<Card
38+
href="https://storybook.rsbuild.dev/guide/framework/web-components.html"
39+
logo="logo-web-components.svg"
40+
title="Web Components"
41+
subtitle="with Rspack / Rsbuild"
42+
/>
43+
</div>
44+
);
45+
}
46+
47+
function Card({
48+
href,
49+
logo,
50+
title,
51+
subtitle,
52+
}: {
53+
href: string;
54+
logo: string;
55+
title: string;
56+
subtitle?: string;
57+
}) {
58+
return (
59+
<Link
60+
className="flex h-20 items-center gap-3 rounded-md border border-slate-200 pl-5 transition-all hover:-translate-y-px hover:border-slate-300 dark:border-slate-700 dark:hover:border-slate-600"
61+
href={href}
62+
>
63+
<Image
64+
alt=""
65+
height="28"
66+
src={`/images/logos/renderers/${logo}`}
67+
width="28"
68+
/>
69+
{subtitle ? (
70+
<div>
71+
<p className="text-md font-bold text-black dark:text-white">
72+
{title}
73+
</p>
74+
<p className="text-sm text-slate-600 dark:text-slate-400">
75+
{subtitle}
76+
</p>
77+
</div>
78+
) : (
79+
<p className="text-md font-bold text-black dark:text-white">{title}</p>
80+
)}
81+
</Link>
82+
);
83+
}

apps/frontpage/components/docs/mdx/home-renderers.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ export function HomeRenderers({ activeVersion }: HomeRenderersProps) {
1414
logo="logo-nextjs.svg"
1515
title="Next.js"
1616
/>
17+
{Number(activeVersion.id) >= 8.5 ? (
18+
<Card
19+
href="/docs/get-started/frameworks/nextjs-vite/?renderer=react"
20+
logo="logo-nextjs.svg"
21+
subtitle="with Vite"
22+
title="Next.js"
23+
/>
24+
) : null}
1725
<Card
1826
href="/docs/get-started/frameworks/react-vite/?renderer=react"
1927
logo="logo-react.svg"

apps/frontpage/components/docs/mdx/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export { A } from './a';
22
export { CodeSnippets } from './code-snippets';
3+
export { CommunityRenderers } from './community-renderers';
34
export { FeatureSnippets } from './feature-snippets';
45
export { HomeConcepts } from './home-concepts';
56
export { HomeRenderers } from './home-renderers';

apps/frontpage/lib/get-page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { ReactNode, ReactElement } from 'react';
66
import {
77
A,
88
CodeSnippets,
9+
CommunityRenderers,
910
FeatureSnippets,
1011
HomeConcepts,
1112
HomeRenderers,
@@ -83,6 +84,7 @@ export const getPageData = async (
8384
CodeSnippets: (props) => (
8485
<CodeSnippets activeVersion={activeVersion} {...props} />
8586
),
87+
CommunityRenderers,
8688
FeatureSnippets,
8789
FrameworkSupportTable: (props: { children: ReactNode }) => (
8890
<div {...props}>{props.children}</div>
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 29 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)