File tree Expand file tree Collapse file tree 4 files changed +34
-15
lines changed
components/TableWithControlsLayout Expand file tree Collapse file tree 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');
88interface TableWithControlsLayoutItemProps {
99 children : React . ReactNode ;
1010 className ?: string ;
11+ wrapperClassName ?: string ;
1112}
1213
1314interface TableProps extends TableWithControlsLayoutItemProps {
@@ -24,9 +25,10 @@ export const TableWithControlsLayout = ({
2425TableWithControlsLayout . Controls = function TableControls ( {
2526 children,
2627 className,
28+ wrapperClassName,
2729} : TableWithControlsLayoutItemProps ) {
2830 return (
29- < div className = { b ( 'controls-wrapper' ) } >
31+ < div className = { b ( 'controls-wrapper' , wrapperClassName ) } >
3032 < div className = { b ( 'controls' , className ) } > { children } </ div >
3133 </ div >
3234 ) ;
Original file line number Diff line number Diff line change @@ -189,12 +189,16 @@ function GroupedStorageGroupsComponent({
189189 } ;
190190
191191 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 >
199203 ) ;
200204}
Original file line number Diff line number Diff line change @@ -192,13 +192,17 @@ function GroupedStorageNodesComponent({
192192 } ;
193193
194194 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 >
202206 ) ;
203207}
204208
Original file line number Diff line number Diff line change 1919 & __groups-wrapper {
2020 padding-right : 20px ;
2121 }
22+
23+ & __controls {
24+ width : unset ;
25+ margin-right : -40px ;
26+ padding-right : 40px ;
27+ padding-left : 20px ;
28+
29+ transform : translateX (-20px );
30+ }
2231}
You can’t perform that action at this time.
0 commit comments