File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
packages/compass-indexes/src/components Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,13 @@ const rowStyles = css({
5454
5555// When row is not hovered, we hide the delete button
5656const indexActionsCellStyles = css ( {
57- display : 'flex' ,
58- justifyContent : 'flex-end' ,
5957 button : {
6058 opacity : 0 ,
6159 '&:focus' : {
6260 opacity : 1 ,
6361 } ,
6462 } ,
65- minWidth : spacing [ 5 ] ,
63+ minWidth : spacing [ 800 ] ,
6664} ) ;
6765
6866const tableHeadStyles = css ( {
@@ -159,16 +157,16 @@ export function IndexesTable<T>({
159157 } `}
160158 >
161159 { row . getVisibleCells ( ) . map ( ( cell : LeafyGreenTableCell < T > ) => {
160+ const isActionsCell = cell . column . id === 'actions' ;
162161 return (
163162 < Cell
164163 key = { cell . id }
165164 id = { cell . id }
166165 cell = { cell }
167- className = { cx (
168- cell . column . id === 'actions' && indexActionsCellStyles ,
169- cell . column . id === 'actions' &&
170- indexActionsCellClassName
171- ) }
166+ className = { cx ( {
167+ [ indexActionsCellClassName ] : isActionsCell ,
168+ [ indexActionsCellStyles ] : isActionsCell ,
169+ } ) }
172170 data-testid = { `${ dataTestId } -${ cell . column . id } -field` }
173171 >
174172 { flexRender (
Original file line number Diff line number Diff line change 11import semver from 'semver' ;
22import React , { useCallback , useMemo } from 'react' ;
33import type { GroupedItemAction } from '@mongodb-js/compass-components' ;
4- import { ItemActionGroup } from '@mongodb-js/compass-components' ;
4+ import { css , ItemActionGroup } from '@mongodb-js/compass-components' ;
5+
6+ const styles = css ( {
7+ // Align actions with the end of the table
8+ justifyContent : 'flex-end' ,
9+ } ) ;
510
611type Index = {
712 name : string ;
@@ -83,9 +88,10 @@ const IndexActions: React.FunctionComponent<IndexActionsProps> = ({
8388 return (
8489 < ItemActionGroup < IndexAction >
8590 data-testid = "index-actions"
91+ className = { styles }
8692 actions = { indexActions }
8793 onAction = { onAction }
88- > </ ItemActionGroup >
94+ / >
8995 ) ;
9096} ;
9197
You can’t perform that action at this time.
0 commit comments