You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
now it only takes one image
fixes#355
[fixes #112189151]
Signed-off-by: Michael Smykowski <msmykowski@pivotal.io>
BREAKING CHANGE: Media API has changed.
`hAlign` | "left" (default), "right" | Horizontal alignment of the media
32
33
`vAlign` | top (default), "middle", "bottom" | Vertical alignment of the body (used for large images with small content next to it, usually centered)
33
-
`stackSize ` | "xsmall", "small", "medium", "large" | At what breakpoint should the media object stack
34
+
`stackSize` | "xsmall", "small", "medium", "large" | At what breakpoint should the media object stack
35
+
`mediaSpacing` | "small", "medium", "large", "xlarge" | Amount of whitespace between media and body
34
36
35
37
The images or other media can be aligned top, middle, or bottom. The default is top aligned.
36
38
@@ -42,32 +44,21 @@ var mediaBasicLinkedImage = <Image src='http://placehold.it/50x50' href="http://
42
44
```
43
45
44
46
```react_example_table
45
-
<Media
46
-
leftImage={mediaBasicImage}
47
-
innerClassName='my-media-body'>
48
-
left media
47
+
<Media image={mediaBasicImage}>
48
+
Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next 10.
49
49
</Media>
50
50
51
-
<Media
52
-
rightImage={mediaBasicLinkedImage}
53
-
vAlign='middle'>
54
-
right media
55
-
</Media>
56
-
57
-
<Media
58
-
leftImage={mediaBasicImage}
59
-
rightImage={mediaBasicImage}
60
-
vAlign='middle'
61
-
stackSize='medium'>
62
-
left and right media
51
+
<Media image={mediaBasicLinkedImage}
52
+
hAlign='right'>
53
+
We are all connected; To each other, biologically. To the earth, chemically. To the rest of the universe atomically.
63
54
</Media>
64
55
```
65
56
66
57
*/
67
58
68
59
/*doc
69
60
---
70
-
title: Alignment
61
+
title: Vertical Alignment
71
62
name: media_alignment_react
72
63
parent: media_react
73
64
---
@@ -78,20 +69,16 @@ var mediaAlignmentImage = <Image href='http://www.google.com' src='http://placeh
78
69
79
70
```react_example
80
71
<div>
81
-
<Media leftImage={mediaAlignmentImage}>
72
+
<Media image={mediaAlignmentImage}>
82
73
Media: top aligned image - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
83
74
</Media>
84
75
85
-
<Flag leftImage={mediaAlignmentImage}>
76
+
<Flag image={mediaAlignmentImage}>
86
77
Flag: middle aligned image - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
87
78
</Flag>
88
79
89
-
<Flag leftImage={mediaAlignmentImage}>
90
-
Flag: middle aligned and middle body (for short text and big images)
91
-
</Flag>
92
-
93
80
<Media
94
-
leftImage={mediaAlignmentImage}
81
+
image={mediaAlignmentImage}
95
82
vAlign='bottom'>
96
83
Media: bottom aligned - This is rarely, if ever, used. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
97
84
</Media>
@@ -114,31 +101,31 @@ var mediaSpacingImage = <Image href='http://www.google.com' src='http://placehol
0 commit comments