File tree Expand file tree Collapse file tree 2 files changed +58
-10
lines changed Expand file tree Collapse file tree 2 files changed +58
-10
lines changed Original file line number Diff line number Diff line change
1
+ import { Story } from "@storybook/react"
2
+ import { Avatar , AvatarProps } from "./Avatar"
3
+ import PauseIcon from "@material-ui/icons/PauseOutlined"
4
+
5
+ export default {
6
+ title : "components/Avatar" ,
7
+ component : Avatar ,
8
+ }
9
+
10
+ const Template : Story < AvatarProps > = ( args : AvatarProps ) => < Avatar { ...args } />
11
+
12
+ export const Letter = Template . bind ( { } )
13
+ Letter . args = {
14
+ children : "Coder" ,
15
+ }
16
+
17
+ export const LetterXL = Template . bind ( { } )
18
+ LetterXL . args = {
19
+ children : "Coder" ,
20
+ size : "xl" ,
21
+ }
22
+
23
+ export const LetterDarken = Template . bind ( { } )
24
+ LetterDarken . args = {
25
+ children : "Coder" ,
26
+ colorScheme : "darken" ,
27
+ }
28
+
29
+ export const Image = Template . bind ( { } )
30
+ Image . args = {
31
+ src : "https://avatars.githubusercontent.com/u/95932066?s=200&v=4" ,
32
+ }
33
+
34
+ export const ImageXL = Template . bind ( { } )
35
+ ImageXL . args = {
36
+ src : "https://avatars.githubusercontent.com/u/95932066?s=200&v=4" ,
37
+ size : "xl" ,
38
+ }
39
+
40
+ export const MuiIcon = Template . bind ( { } )
41
+ MuiIcon . args = {
42
+ children : < PauseIcon /> ,
43
+ }
44
+
45
+ export const MuiIconDarken = Template . bind ( { } )
46
+ MuiIconDarken . args = {
47
+ children : < PauseIcon /> ,
48
+ colorScheme : "darken" ,
49
+ }
50
+
51
+ export const MuiIconXL = Template . bind ( { } )
52
+ MuiIconXL . args = {
53
+ children : < PauseIcon /> ,
54
+ size : "xl" ,
55
+ }
Original file line number Diff line number Diff line change @@ -16,16 +16,9 @@ Example.args = {
16
16
subtitle : "coder@coder.com" ,
17
17
}
18
18
19
- export const WithHighlightTitle = Template . bind ( { } )
20
- WithHighlightTitle . args = {
19
+ export const WithImage = Template . bind ( { } )
20
+ WithImage . args = {
21
21
title : "coder" ,
22
22
subtitle : "coder@coder.com" ,
23
- highlightTitle : true ,
24
- }
25
-
26
- export const WithLink = Template . bind ( { } )
27
- WithLink . args = {
28
- title : "coder" ,
29
- subtitle : "coder@coder.com" ,
30
- link : "/users/coder" ,
23
+ src : "https://avatars.githubusercontent.com/u/95932066?s=200&v=4" ,
31
24
}
You can’t perform that action at this time.
0 commit comments