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 {
154154
155155 const MAX_ITEMS = 4 ;
156156
157- let columnClasses = 'trace-grid__column' ;
158-
159- if (
157+ const columnClasses =
160158 ( items . length > MAX_ITEMS && ! category . maxColumns ) ||
161159 ( 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' ;
165162
166163 return (
167164 < div className = { columnClasses } key = { i } >
@@ -195,29 +192,20 @@ class TraceTypeSelector extends Component {
195192 traceTypesConfig : { traces, complex} ,
196193 } = this . props ;
197194
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-
211195 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+ ) ) }
221209 </ div >
222210 ) ;
223211 }
Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ $label-height: 34px;
44$row-height : $image-size + $label-height + $default-half-spacing-unit +
55 $default-quarter-spacing-unit ;
66
7+ .trace-grid-single-block {
8+ max-width : 460px ;
9+ display : flex ;
10+ flex-flow : wrap ;
11+ padding : var (--spacing-quarter-unit );
12+ }
13+
714.trace-grid {
815 display : grid ;
916 grid-template-columns : repeat (4 , 1fr );
You can’t perform that action at this time.
0 commit comments