File tree 4 files changed +34
-15
lines changed
components/TableWithControlsLayout
4 files changed +34
-15
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const b = cn('ydb-table-with-controls-layout');
8
8
interface TableWithControlsLayoutItemProps {
9
9
children : React . ReactNode ;
10
10
className ?: string ;
11
+ wrapperClassName ?: string ;
11
12
}
12
13
13
14
interface TableProps extends TableWithControlsLayoutItemProps {
@@ -24,9 +25,10 @@ export const TableWithControlsLayout = ({
24
25
TableWithControlsLayout . Controls = function TableControls ( {
25
26
children,
26
27
className,
28
+ wrapperClassName,
27
29
} : TableWithControlsLayoutItemProps ) {
28
30
return (
29
- < div className = { b ( 'controls-wrapper' ) } >
31
+ < div className = { b ( 'controls-wrapper' , wrapperClassName ) } >
30
32
< div className = { b ( 'controls' , className ) } > { children } </ div >
31
33
</ div >
32
34
) ;
Original file line number Diff line number Diff line change @@ -189,12 +189,16 @@ function GroupedStorageGroupsComponent({
189
189
} ;
190
190
191
191
return (
192
- < TableWithControlsLayout >
193
- < TableWithControlsLayout . Controls > { renderControls ( ) } </ TableWithControlsLayout . Controls >
194
- { error ? < ResponseError error = { error } /> : null }
195
- < TableWithControlsLayout . Table loading = { isLoading } className = { b ( 'groups-wrapper' ) } >
196
- { renderGroups ( ) }
197
- </ TableWithControlsLayout . Table >
198
- </ TableWithControlsLayout >
192
+ < React . Fragment >
193
+ < TableWithControlsLayout . Controls wrapperClassName = { b ( 'controls' ) } >
194
+ { renderControls ( ) }
195
+ </ TableWithControlsLayout . Controls >
196
+ < TableWithControlsLayout >
197
+ { error ? < ResponseError error = { error } /> : null }
198
+ < TableWithControlsLayout . Table loading = { isLoading } className = { b ( 'groups-wrapper' ) } >
199
+ { renderGroups ( ) }
200
+ </ TableWithControlsLayout . Table >
201
+ </ TableWithControlsLayout >
202
+ </ React . Fragment >
199
203
) ;
200
204
}
Original file line number Diff line number Diff line change @@ -192,13 +192,17 @@ function GroupedStorageNodesComponent({
192
192
} ;
193
193
194
194
return (
195
- < TableWithControlsLayout >
196
- < TableWithControlsLayout . Controls > { renderControls ( ) } </ TableWithControlsLayout . Controls >
197
- { error ? < ResponseError error = { error } /> : null }
198
- < TableWithControlsLayout . Table loading = { isLoading } className = { b ( 'groups-wrapper' ) } >
199
- { renderGroups ( ) }
200
- </ TableWithControlsLayout . Table >
201
- </ TableWithControlsLayout >
195
+ < React . Fragment >
196
+ < TableWithControlsLayout . Controls wrapperClassName = { b ( 'controls' ) } >
197
+ { renderControls ( ) }
198
+ </ TableWithControlsLayout . Controls >
199
+ < TableWithControlsLayout >
200
+ { error ? < ResponseError error = { error } /> : null }
201
+ < TableWithControlsLayout . Table loading = { isLoading } className = { b ( 'groups-wrapper' ) } >
202
+ { renderGroups ( ) }
203
+ </ TableWithControlsLayout . Table >
204
+ </ TableWithControlsLayout >
205
+ </ React . Fragment >
202
206
) ;
203
207
}
204
208
Original file line number Diff line number Diff line change 19
19
& __groups-wrapper {
20
20
padding-right : 20px ;
21
21
}
22
+
23
+ & __controls {
24
+ width : unset ;
25
+ margin-right : -40px ;
26
+ padding-right : 40px ;
27
+ padding-left : 20px ;
28
+
29
+ transform : translateX (-20px );
30
+ }
22
31
}
You can’t perform that action at this time.
0 commit comments