Remove border bottom in manage owners settings for last owner if there are 4 or more owners

This commit is contained in:
Mikhail Mikheev 2019-09-06 18:06:06 +04:00
parent 91992ccaaf
commit bac99f62fd
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
// @flow
import React from 'react'
import cn from 'classnames'
import { List } from 'immutable'
import { withStyles } from '@material-ui/core/styles'
import TableRow from '@material-ui/core/TableRow'
@ -145,7 +146,12 @@ class ManageOwners extends React.Component<Props, State> {
noBorder
>
{(sortedData: Array<OwnerRow>) => sortedData.map((row: any, index: number) => (
<TableRow tabIndex={-1} key={index} className={classes.hide} data-testid={OWNERS_ROW_TEST_ID}>
<TableRow
tabIndex={-1}
key={index}
className={cn(classes.hide, index >= 3 && index === sortedData.size - 1 && classes.noBorderBottom)}
data-testid={OWNERS_ROW_TEST_ID}
>
{autoColumns.map((column: Column) => (
<TableCell key={column.id} style={cellWidth(column.width)} align={column.align} component="td">
{column.id === OWNERS_TABLE_ADDRESS_ID ? (

View File

@ -24,6 +24,11 @@ export const styles = () => ({
justifyContent: 'flex-end',
visibility: 'hidden',
},
noBorderBottom: {
'& > td': {
borderBottom: 'none',
},
},
editOwnerIcon: {
cursor: 'pointer',
},