-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add storybook for landing + redocly layout
- Loading branch information
1 parent
9f73e54
commit 94c05a7
Showing
4 changed files
with
177 additions
and
6 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
packages/apps/docs/src/components/Layout/Landing/index.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,68 @@ | ||
import { landingFrontMatter } from '../__fixtures__/frontmatter'; | ||
import { leftMenuTree } from '../__fixtures__/leftMenuTree'; | ||
import { Landing } from '../Landing'; | ||
|
||
import { Heading2 } from '@/components/Markdown/Heading'; | ||
import { Paragraph } from '@/components/Markdown/Paragraph'; | ||
import { IPageProps } from '@/types/Layout'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
|
||
const meta: Meta<IPageProps> = { | ||
title: 'Layout/Landing', | ||
component: Landing, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<IPageProps>; | ||
|
||
const props: IPageProps = { | ||
frontmatter: landingFrontMatter, | ||
leftMenuTree: leftMenuTree, | ||
menuItems: [], | ||
aSideMenuTree: [], | ||
topDocs: [], | ||
}; | ||
|
||
export const Default: Story = { | ||
name: 'Default', | ||
args: props, | ||
render: ({ frontmatter, leftMenuTree }) => ( | ||
<div> | ||
<Landing | ||
frontmatter={frontmatter} | ||
leftMenuTree={leftMenuTree} | ||
menuItems={[]} | ||
aSideMenuTree={[]} | ||
topDocs={[]} | ||
> | ||
<Heading2>Kadena: The Next Generation Blockchain</Heading2> | ||
<Paragraph> | ||
JANUARY 2018 ROUND UP — Kadena has a lot of exciting news and updates | ||
about our company, its technology, and what's on the horizon. We | ||
want to thank you all so much for your incredible enthusiasm and | ||
support! Here's what's gone down in the past few months: | ||
</Paragraph> | ||
<Heading2>Kadena raises $2.25M in first funding round</Heading2> | ||
<Paragraph> | ||
Kadena co-founders{' '} | ||
<Link href="http://kadena.io/#/team">Will Martino</Link>, and{' '} | ||
<Link href="http://kadena.io/#/team">Stuart Popejoy</Link>, announced | ||
that we raised $2.25M in our pre-A{'\n'}financing round. Major | ||
investors in the private-placement SAFT round included Metastable, | ||
Kilowatt Capital, Coinfund, and Multicoin Capital. Check out the{' '} | ||
<Link href="https://www.coindesk.com/jp-morgan-blockchain-spin-off-raises-2-25-million/"> | ||
CoinDesk | ||
</Link> | ||
, article that launched a frenzy of interest and{' '} | ||
<Link href="http://kadena.io/docs/KadenaPR-1-31-2018.pdf"> | ||
read our press release | ||
</Link> | ||
. | ||
</Paragraph> | ||
</Landing> | ||
</div> | ||
), | ||
}; |
68 changes: 68 additions & 0 deletions
68
packages/apps/docs/src/components/Layout/Redocly/index.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,68 @@ | ||
import { redoclyFrontMatter } from '../__fixtures__/frontmatter'; | ||
import { leftMenuTree } from '../__fixtures__/leftMenuTree'; | ||
import { Redocly } from '../Redocly'; | ||
|
||
import { Heading2 } from '@/components/Markdown/Heading'; | ||
import { Paragraph } from '@/components/Markdown/Paragraph'; | ||
import { IPageProps } from '@/types/Layout'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
|
||
const meta: Meta<IPageProps> = { | ||
title: 'Layout/Redocly', | ||
component: Redocly, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<IPageProps>; | ||
|
||
const props: IPageProps = { | ||
frontmatter: redoclyFrontMatter, | ||
leftMenuTree: leftMenuTree, | ||
menuItems: [], | ||
aSideMenuTree: [], | ||
topDocs: [], | ||
}; | ||
|
||
export const Default: Story = { | ||
name: 'Default', | ||
args: props, | ||
render: ({ frontmatter, leftMenuTree }) => ( | ||
<div> | ||
<Redocly | ||
frontmatter={frontmatter} | ||
leftMenuTree={leftMenuTree} | ||
menuItems={[]} | ||
aSideMenuTree={[]} | ||
topDocs={[]} | ||
> | ||
<Heading2>Kadena: The Next Generation Blockchain</Heading2> | ||
<Paragraph> | ||
JANUARY 2018 ROUND UP — Kadena has a lot of exciting news and updates | ||
about our company, its technology, and what's on the horizon. We | ||
want to thank you all so much for your incredible enthusiasm and | ||
support! Here's what's gone down in the past few months: | ||
</Paragraph> | ||
<Heading2>Kadena raises $2.25M in first funding round</Heading2> | ||
<Paragraph> | ||
Kadena co-founders{' '} | ||
<Link href="http://kadena.io/#/team">Will Martino</Link>, and{' '} | ||
<Link href="http://kadena.io/#/team">Stuart Popejoy</Link>, announced | ||
that we raised $2.25M in our pre-A{'\n'}financing round. Major | ||
investors in the private-placement SAFT round included Metastable, | ||
Kilowatt Capital, Coinfund, and Multicoin Capital. Check out the{' '} | ||
<Link href="https://www.coindesk.com/jp-morgan-blockchain-spin-off-raises-2-25-million/"> | ||
CoinDesk | ||
</Link> | ||
, article that launched a frenzy of interest and{' '} | ||
<Link href="http://kadena.io/docs/KadenaPR-1-31-2018.pdf"> | ||
read our press release | ||
</Link> | ||
. | ||
</Paragraph> | ||
</Redocly> | ||
</div> | ||
), | ||
}; |
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