@@ -43,6 +43,10 @@ const useStyles = makeStyles({
43
43
} ,
44
44
buttonMargin : {
45
45
padding : 1 ,
46
+ } ,
47
+ slotInfo : {
48
+ marginBottom : 10 ,
49
+ marginRight : 0 ,
46
50
}
47
51
} ) ;
48
52
@@ -79,6 +83,35 @@ export default function Node(props) {
79
83
// Then we need to know how many columns we will display.
80
84
const columnWidth : GridSize = 12 / stereotypeColumns as any ;
81
85
86
+ function CreateStereotypeGridItem ( slotStereotype : any , index : any ) {
87
+ return (
88
+ < Grid container item alignItems = 'center' spacing = { 1 } >
89
+ < Grid item key = { index } >
90
+ < img
91
+ src = { browserLogo ( slotStereotype . stereotype . browserName ) }
92
+ className = { classes . browserLogo }
93
+ alt = "Browser Logo"
94
+ />
95
+ </ Grid >
96
+ < Grid item key = { index } >
97
+ < Typography className = { classes . slotInfo } >
98
+ { slotStereotype . slots }
99
+ </ Typography >
100
+ </ Grid >
101
+ < Grid item key = { index } >
102
+ < Typography className = { classes . slotInfo } >
103
+ {
104
+ browserVersion (
105
+ slotStereotype . stereotype . browserVersion ??
106
+ slotStereotype . stereotype . version
107
+ )
108
+ }
109
+ </ Typography >
110
+ </ Grid >
111
+ </ Grid >
112
+ ) ;
113
+ }
114
+
82
115
return (
83
116
< Card
84
117
className = { classes . root }
@@ -178,24 +211,8 @@ export default function Node(props) {
178
211
nodeInfo . slotStereotypes
179
212
. slice ( index * 3 , Math . min ( ( index * 3 ) + 3 , nodeInfo . slotStereotypes . length ) )
180
213
. map ( ( slotStereotype : any , idx ) => {
181
- return ( < Typography
182
- color = "textPrimary"
183
- variant = "h6"
184
- key = { idx }
185
- >
186
- < img
187
- src = { browserLogo ( slotStereotype . stereotype . browserName ) }
188
- className = { classes . browserLogo }
189
- alt = "Browser Logo"
190
- />
191
- { slotStereotype . slots }
192
- {
193
- browserVersion (
194
- slotStereotype . stereotype . browserVersion ??
195
- slotStereotype . stereotype . version
196
- )
197
- }
198
- </ Typography >
214
+ return (
215
+ CreateStereotypeGridItem ( slotStereotype , idx )
199
216
)
200
217
} ) }
201
218
</ Grid >
0 commit comments