Skip to content

Commit 560879e

Browse files
committedJul 11, 2023
feat(sb): Add base stories for legacy components
1 parent 0c33ac4 commit 560879e

File tree

8 files changed

+17081
-7037
lines changed

8 files changed

+17081
-7037
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { ArticleCard } from '../src/article-card';
2+
3+
export default {
4+
title: 'Legacy/Article Card',
5+
component: ArticleCard,
6+
tags: ['autodocs'],
7+
parameters: {
8+
layout: 'fullscreen',
9+
},
10+
};
11+
12+
export const Default = {
13+
args: {
14+
article: {
15+
title: "Test Article",
16+
slug: "/#",
17+
date: new Date(),
18+
image: {
19+
thumbnail: "https://avatars.githubusercontent.com/u/440052"
20+
},
21+
content: {
22+
excerpt: "This is some test copy"
23+
}
24+
},
25+
withBody: true,
26+
withImage: true,
27+
withDate: true,
28+
}
29+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Footer } from '../src/footer';
2+
3+
export default {
4+
title: 'Legacy/Footer',
5+
component: Footer,
6+
tags: ['autodocs'],
7+
parameters: {
8+
layout: 'fullscreen',
9+
},
10+
};
11+
12+
export const Default = {};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Form, Input, InlineGroup, TextArea, Submit } from '../src/form';
2+
3+
export default {
4+
title: 'Legacy/Form',
5+
component: Form,
6+
tags: ['autodocs'],
7+
parameters: {
8+
layout: 'fullscreen',
9+
},
10+
};
11+
12+
export const Default = {
13+
render: () =>
14+
<Form action="#" target="_self">
15+
<Input type="text" name="name" placeholder="Name" />
16+
<Input type="text" name="phone" placeholder="Phone" />
17+
<Input type="text" name="email" placeholder="Email" />
18+
<TextArea name="message" placeholder="How can I help?" />
19+
<Submit />
20+
</Form>
21+
};
22+
23+
export const Inline = {
24+
render: () =>
25+
<Form action="#" target="_self">
26+
<InlineGroup>
27+
<Input type="text" name="phone" placeholder="Phone" />
28+
<Submit />
29+
</InlineGroup>
30+
</Form>
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Header } from '../src/header';
2+
3+
export default {
4+
title: 'Legacy/Header',
5+
component: Header,
6+
tags: ['autodocs'],
7+
parameters: {
8+
layout: 'fullscreen',
9+
},
10+
};
11+
12+
export const Default = {};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ShareWidget } from '../src/share-widget';
2+
3+
export default {
4+
title: 'Legacy/Share Widget',
5+
component: ShareWidget,
6+
tags: ['autodocs'],
7+
parameters: {
8+
layout: 'fullscreen',
9+
},
10+
};
11+
12+
export const Default = {
13+
args: {
14+
url: "https://example.com",
15+
title: "Example"
16+
}
17+
};

0 commit comments

Comments
 (0)