File tree Expand file tree Collapse file tree 2 files changed +23
-28
lines changed
styles/components/widgets Expand file tree Collapse file tree 2 files changed +23
-28
lines changed Original file line number Diff line number Diff line change @@ -154,14 +154,11 @@ class TraceTypeSelector extends Component {
154
154
155
155
const MAX_ITEMS = 4 ;
156
156
157
- let columnClasses = 'trace-grid__column' ;
158
-
159
- if (
157
+ const columnClasses =
160
158
( items . length > MAX_ITEMS && ! category . maxColumns ) ||
161
159
( category . maxColumns && category . maxColumns > 1 )
162
- ) {
163
- columnClasses += ' trace-grid__column--double' ;
164
- }
160
+ ? 'trace-grid__column trace-grid__column--double'
161
+ : 'trace-grid__column' ;
165
162
166
163
return (
167
164
< div className = { columnClasses } key = { i } >
@@ -195,29 +192,20 @@ class TraceTypeSelector extends Component {
195
192
traceTypesConfig : { traces, complex} ,
196
193
} = this . props ;
197
194
198
- const items = traces ( _ ) . map ( item => (
199
- < Item
200
- key = { item . value }
201
- complex = { complex }
202
- active = { fullValue === item . value }
203
- item = { item }
204
- actions = { this . actions }
205
- showActions = { false }
206
- handleClick = { ( ) => this . selectAndClose ( item . value ) }
207
- style = { { display : 'inline-block' } }
208
- />
209
- ) ) ;
210
-
211
195
return (
212
- < div
213
- style = { {
214
- maxWidth : '460px' ,
215
- display : 'flex' ,
216
- flexFlow : 'wrap' ,
217
- padding : '5px' ,
218
- } }
219
- >
220
- { items }
196
+ < div className = "trace-grid-single-block" >
197
+ { traces ( _ ) . map ( item => (
198
+ < Item
199
+ key = { item . value }
200
+ complex = { complex }
201
+ active = { fullValue === item . value }
202
+ item = { item }
203
+ actions = { this . actions }
204
+ showActions = { false }
205
+ handleClick = { ( ) => this . selectAndClose ( item . value ) }
206
+ style = { { display : 'inline-block' } }
207
+ />
208
+ ) ) }
221
209
</ div >
222
210
) ;
223
211
}
Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ $label-height: 34px;
4
4
$row-height : $image-size + $label-height + $default-half-spacing-unit +
5
5
$default-quarter-spacing-unit ;
6
6
7
+ .trace-grid-single-block {
8
+ max-width : 460px ;
9
+ display : flex ;
10
+ flex-flow : wrap ;
11
+ padding : var (--spacing-quarter-unit );
12
+ }
13
+
7
14
.trace-grid {
8
15
display : grid ;
9
16
grid-template-columns : repeat (4 , 1fr );
You can’t perform that action at this time.
0 commit comments