-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sb): Add base stories for legacy components
- Loading branch information
1 parent
0c33ac4
commit 5c96b9a
Showing
5 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
components/legacy-components/stories/article-card.stories.js
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,29 @@ | ||
import { ArticleCard } from '../src/article-card'; | ||
|
||
export default { | ||
title: 'Legacy/Article Card', | ||
component: ArticleCard, | ||
tags: ['autodocs'], | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
article: { | ||
title: "Test Article", | ||
slug: "/#", | ||
date: new Date(), | ||
image: { | ||
thumbnail: "https://avatars.githubusercontent.com/u/440052" | ||
}, | ||
content: { | ||
excerpt: "This is some test copy" | ||
} | ||
}, | ||
withBody: true, | ||
withImage: true, | ||
withDate: true, | ||
} | ||
}; |
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,12 @@ | ||
import { Footer } from '../src/footer'; | ||
|
||
export default { | ||
title: 'Legacy/Footer', | ||
component: Footer, | ||
tags: ['autodocs'], | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
}; | ||
|
||
export const Default = {}; |
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,31 @@ | ||
import { Form, Input, InlineGroup, TextArea, Submit } from '../src/form'; | ||
|
||
export default { | ||
title: 'Legacy/Form', | ||
component: Form, | ||
tags: ['autodocs'], | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
}; | ||
|
||
export const Default = { | ||
render: () => | ||
<Form action="#" target="_self"> | ||
<Input type="text" name="name" placeholder="Name" /> | ||
<Input type="text" name="phone" placeholder="Phone" /> | ||
<Input type="text" name="email" placeholder="Email" /> | ||
<TextArea name="message" placeholder="How can I help?" /> | ||
<Submit /> | ||
</Form> | ||
}; | ||
|
||
export const Inline = { | ||
render: () => | ||
<Form action="#" target="_self"> | ||
<InlineGroup> | ||
<Input type="text" name="phone" placeholder="Phone" /> | ||
<Submit /> | ||
</InlineGroup> | ||
</Form> | ||
} |
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,12 @@ | ||
import { Header } from '../src/header'; | ||
|
||
export default { | ||
title: 'Legacy/Header', | ||
component: Header, | ||
tags: ['autodocs'], | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
}; | ||
|
||
export const Default = {}; |
17 changes: 17 additions & 0 deletions
17
components/legacy-components/stories/share-widget.stories.js
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,17 @@ | ||
import { ShareWidget } from '../src/share-widget'; | ||
|
||
export default { | ||
title: 'Legacy/Share Widget', | ||
component: ShareWidget, | ||
tags: ['autodocs'], | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
url: "https://example.com", | ||
title: "Example" | ||
} | ||
}; |