File tree 1 file changed +14
-16
lines changed
site/src/components/AvatarData 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change 1
- import { Story } from "@storybook/react" ;
2
- import { AvatarData , AvatarDataProps } from "./AvatarData" ;
1
+ import type { Meta , StoryObj } from "@storybook/react" ;
2
+ import { AvatarData } from "./AvatarData" ;
3
3
4
- export default {
4
+ const meta : Meta < typeof AvatarData > = {
5
5
title : "components/AvatarData" ,
6
6
component : AvatarData ,
7
+ args : {
8
+ title : "coder" ,
9
+ subtitle : "coder@coder.com" ,
10
+ } ,
7
11
} ;
8
12
9
- const Template : Story < AvatarDataProps > = ( args : AvatarDataProps ) => (
10
- < AvatarData { ...args } />
11
- ) ;
13
+ export default meta ;
14
+ type Story = StoryObj < typeof AvatarData > ;
12
15
13
- export const Example = Template . bind ( { } ) ;
14
- Example . args = {
15
- title : "coder" ,
16
- subtitle : "coder@coder.com" ,
17
- } ;
16
+ export const WithTitleAndSubtitle : Story = { } ;
18
17
19
- export const WithImage = Template . bind ( { } ) ;
20
- WithImage . args = {
21
- title : "coder" ,
22
- subtitle : "coder@coder.com" ,
23
- src : "https://avatars.githubusercontent.com/u/95932066?s=200&v=4" ,
18
+ export const WithImage : Story = {
19
+ args : {
20
+ src : "https://AvatarDatas.githubusercontent.com/u/95932066?s=200&v=4" ,
21
+ } ,
24
22
} ;
You can’t perform that action at this time.
0 commit comments