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 ( {
@@ -157,16 +155,16 @@ export function IndexesTable<T>({
157155 } `}
158156 >
159157 { row . getVisibleCells ( ) . map ( ( cell : LeafyGreenTableCell < T > ) => {
158+ const isActionsCell = cell . column . id === 'actions' ;
160159 return (
161160 < Cell
162161 key = { cell . id }
163162 id = { cell . id }
164163 cell = { cell }
165- className = { cx (
166- cell . column . id === 'actions' && indexActionsCellStyles ,
167- cell . column . id === 'actions' &&
168- indexActionsCellClassName
169- ) }
164+ className = { cx ( {
165+ [ indexActionsCellClassName ] : isActionsCell ,
166+ [ indexActionsCellStyles ] : isActionsCell ,
167+ } ) }
170168 data-testid = { `${ dataTestId } -${ cell . column . id } -field` }
171169 >
172170 { 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