You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							40 lines
						
					
					
						
							973 B
						
					
					
				
			
		
		
	
	
							40 lines
						
					
					
						
							973 B
						
					
					
				| import type { Post } from 'contentlayer/generated';
 | |
| import type { Meta, StoryObj } from '@storybook/react';
 | |
| 
 | |
| import { PostCard } from '@/components/post-card';
 | |
| import { Center, Padding } from './decorators';
 | |
| 
 | |
| const meta: Meta<typeof PostCard> = {
 | |
|   title: 'Post Card',
 | |
|   component: PostCard,
 | |
|   decorators: [Center, Padding],
 | |
| };
 | |
| 
 | |
| export default meta;
 | |
| type Story = StoryObj<typeof PostCard>;
 | |
| 
 | |
| export const Normal: Story = {
 | |
|   args: {
 | |
|     post: {
 | |
|       title: 'Example Post',
 | |
|       excerpt: 'This is an example post.',
 | |
|       date: '2022-01-01',
 | |
|       tags: ['example', 'post', 'tags'],
 | |
|       url: '/posts/example-post',
 | |
|       slug: 'posts/example-post',
 | |
|     } as Post,
 | |
|   },
 | |
| };
 | |
| 
 | |
| export const FreshPost: Story = {
 | |
|   args: {
 | |
|     post: {
 | |
|       title: 'Example Post',
 | |
|       excerpt: 'This is an example post.',
 | |
|       date: new Date().toISOString(),
 | |
|       tags: ['example', 'post', 'tags'],
 | |
|       url: '/posts/example-post',
 | |
|       slug: 'posts/example-post',
 | |
|     } as Post,
 | |
|   },
 | |
| };
 | |
| 
 |