Skip to content

Commit

Permalink
feat(sb): Add base stories for legacy components
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwilson committed May 26, 2024
1 parent 55f9a9d commit b08e450
Show file tree
Hide file tree
Showing 8 changed files with 13,977 additions and 10,621 deletions.
29 changes: 29 additions & 0 deletions components/legacy-components/stories/article-card.stories.js
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,
}
};
12 changes: 12 additions & 0 deletions components/legacy-components/stories/footer.stories.js
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 = {};
31 changes: 31 additions & 0 deletions components/legacy-components/stories/form.stories.js
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>
}
12 changes: 12 additions & 0 deletions components/legacy-components/stories/header.stories.js
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 components/legacy-components/stories/share-widget.stories.js
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"
}
};
Loading

0 comments on commit b08e450

Please sign in to comment.