2021-05-07 21:00:01 +03:00
|
|
|
import { storiesOf } from '@storybook/react';
|
|
|
|
import { DateTime } from 'luxon';
|
|
|
|
import PostOverviewCard, { PostOverviewCardProps } from './PostOverviewCard';
|
|
|
|
|
|
|
|
storiesOf('Components/Post Overview Card', module)
|
|
|
|
.add('static', () => {
|
|
|
|
const defaultPreview: PostOverviewCardProps = {
|
|
|
|
createdAt: DateTime.now(),
|
|
|
|
createdBy: {
|
|
|
|
name: 'fido_node',
|
|
|
|
avatar: 'avatar.jpg'
|
|
|
|
},
|
|
|
|
path: '/blog/asdasdasdasd',
|
|
|
|
title: ' The Ultimate Web Developer Resources List 🔥Awesome 200+ Resources',
|
|
|
|
preview: {},
|
|
|
|
tags: [{ text: 'asdf' }, { text: 'ghjkl' }, { text: 'qwertyuioio' }]
|
|
|
|
};
|
|
|
|
|
|
|
|
return <PostOverviewCard {...defaultPreview} />;
|
|
|
|
})
|
|
|
|
.add('with preview', () => {
|
|
|
|
const defaultPreview: PostOverviewCardProps = {
|
|
|
|
createdAt: DateTime.now(),
|
|
|
|
createdBy: {
|
|
|
|
name: 'fido_node',
|
|
|
|
avatar: 'avatar.jpg'
|
|
|
|
},
|
|
|
|
path: '/blog/asdasdasdasd',
|
|
|
|
title: 'How to create your personal static blog and do not lost your mind. 🔥',
|
|
|
|
preview: {
|
|
|
|
headerMedia: {
|
|
|
|
key: 'Image',
|
|
|
|
url: './pattern.png',
|
|
|
|
alt: 'awesome pattern'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
tags: [
|
|
|
|
{ text: 'next.js' },
|
|
|
|
{ text: 'typescript' },
|
|
|
|
{ text: 'tailwind' },
|
|
|
|
{ text: 'storybook' }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
return <PostOverviewCard {...defaultPreview} />;
|
|
|
|
})
|
2021-05-19 09:18:55 +03:00
|
|
|
.add('with preview/without avatar', () => {
|
|
|
|
const defaultPreview: PostOverviewCardProps = {
|
|
|
|
createdAt: DateTime.now(),
|
|
|
|
path: '/blog/asdasdasdasd',
|
|
|
|
title: 'How to create your personal static blog and do not lost your mind. 🔥',
|
|
|
|
preview: {
|
|
|
|
headerMedia: {
|
|
|
|
key: 'Image',
|
|
|
|
url: './pattern.png',
|
|
|
|
alt: 'awesome pattern'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
tags: [
|
|
|
|
{ text: 'next.js' },
|
|
|
|
{ text: 'typescript' },
|
|
|
|
{ text: 'tailwind' },
|
|
|
|
{ text: 'storybook' }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
return <PostOverviewCard {...defaultPreview} />;
|
|
|
|
})
|
2021-05-07 21:00:01 +03:00
|
|
|
.add('without tags', () => {
|
|
|
|
const defaultPreview: PostOverviewCardProps = {
|
|
|
|
createdAt: DateTime.now(),
|
|
|
|
createdBy: {
|
|
|
|
name: 'fido_node',
|
|
|
|
avatar: 'avatar.jpg'
|
|
|
|
},
|
|
|
|
path: '/blog/asdasdasdasd',
|
|
|
|
title: ' The Ultimate Web Developer Resources List 🔥Awesome 200+ Resources',
|
|
|
|
preview: {},
|
|
|
|
tags: []
|
|
|
|
};
|
|
|
|
|
|
|
|
return <PostOverviewCard {...defaultPreview} />;
|
|
|
|
});
|