Skip to content

Commit eed487a

Browse files
committed
feat(design-system): register LabCard example
1 parent 7376f31 commit eed487a

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { LabCard } from './index'
2+
3+
const example = {
4+
title: 'Forms Lab',
5+
tagline: 'Digitize forms to create modern, accessible experiences for public outreach.',
6+
order: 1,
7+
links: [
8+
{ label: 'Demo (Forms Platform)', url: 'https://example.com/demo' },
9+
{ label: 'GitHub repository — Forms Platform', url: 'https://github.com/flexion/forms' },
10+
{ label: 'GitHub repository — Forms Lab (experiment)', url: 'https://github.com/flexion/forms-lab' },
11+
],
12+
}
13+
14+
export function LabCardExamples() {
15+
return (
16+
<section id="lab-card">
17+
<h2>Lab card</h2>
18+
<p>Featured-lab card on the home page. Title is not a link; each link inside the card is an external link.</p>
19+
<LabCard lab={example} />
20+
</section>
21+
)
22+
}

src/pages/design-system.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { CardExamples } from '../design/components/card/examples'
99
import { HeaderExamples } from '../design/components/header/examples'
1010
import { FooterExamples } from '../design/components/footer/examples'
1111
import { RepoCardExamples } from '../design/components/repo-card/examples'
12+
import { LabCardExamples } from '../design/components/lab-card/examples'
1213
import { StandardsListExamples } from '../design/components/standards-list/examples'
1314
import { SideNavExamples } from '../design/components/side-nav/examples'
1415
import { CatalogFilterExamples } from '../design/components/catalog-filter/examples'
@@ -35,6 +36,7 @@ const NAV_ITEMS = [
3536
{ href: '#side-nav', label: 'Side nav' },
3637
{ href: '#header', label: 'Header' },
3738
{ href: '#footer', label: 'Footer' },
39+
{ href: '#lab-card', label: 'Lab card' },
3840
{ href: '#repo-card', label: 'Repo card' },
3941
{ href: '#standards-list', label: 'Standards list' },
4042
{ href: '#catalog-filter', label: 'Catalog filter' },
@@ -73,6 +75,7 @@ export function DesignSystem({ config }: { config: SiteConfig }) {
7375
<SideNavExamples />
7476
<HeaderExamples config={config} />
7577
<FooterExamples config={config} />
78+
<LabCardExamples />
7679
<RepoCardExamples />
7780
<StandardsListExamples />
7881
<CatalogFilterExamples />

0 commit comments

Comments
 (0)