diff --git a/src/components/Table/index.jsx b/src/components/Table/index.jsx index 02809530..9999674c 100644 --- a/src/components/Table/index.jsx +++ b/src/components/Table/index.jsx @@ -167,7 +167,7 @@ class GnoTable extends React.Component, State> { } GnoTable.defaultProps = { - defaultOrder: 'asc' + defaultOrder: 'asc', } export default withStyles(styles)(GnoTable) diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/awaiting.svg b/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/awaiting.svg new file mode 100644 index 00000000..a8dedcd6 --- /dev/null +++ b/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/awaiting.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/error.svg b/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/error.svg new file mode 100644 index 00000000..bb6dbf77 --- /dev/null +++ b/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/error.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/ok.svg b/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/ok.svg new file mode 100644 index 00000000..cb8f6656 --- /dev/null +++ b/src/routes/safe/components/TransactionsNew/TxsTable/Status/assets/ok.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/index.jsx b/src/routes/safe/components/TransactionsNew/TxsTable/Status/index.jsx new file mode 100644 index 00000000..8d5ee910 --- /dev/null +++ b/src/routes/safe/components/TransactionsNew/TxsTable/Status/index.jsx @@ -0,0 +1,35 @@ +// @flow +import * as React from 'react' +import { withStyles } from '@material-ui/core/styles' +import Block from '~/components/layout/Block' +import Paragraph from '~/components/layout/Paragraph/' +import Img from '~/components/layout/Img' +import ErrorIcon from './assets/error.svg' +import OkIcon from './assets/ok.svg' +import AwaitingIcon from './assets/awaiting.svg' +import { styles } from './style' + +type Props = { + classes: Object, + status: 'pending' | 'awaiting' | 'success' | 'failed', +} + +const statusToIcon = { + success: OkIcon, + failed: ErrorIcon, + awaiting: AwaitingIcon, +} + +const statusIconStyle={ + height: '14px', + width: '14px', +} + +const Status = ({ classes, status }: Props) => ( + + OK Icon + {status} + +) + +export default withStyles(styles)(Status) diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/Status/style.js b/src/routes/safe/components/TransactionsNew/TxsTable/Status/style.js new file mode 100644 index 00000000..56f48e76 --- /dev/null +++ b/src/routes/safe/components/TransactionsNew/TxsTable/Status/style.js @@ -0,0 +1,30 @@ +// @flow +import { smallFontSize, boldFont, sm } from '~/theme/variables' + +export const styles = () => ({ + container: { + display: 'flex', + fontSize: smallFontSize, + fontWeight: boldFont, + width: '105px', + padding: sm, + alignItems: 'center', + boxSizing: 'border-box', + }, + success: { + backgroundColor: '#d7f3f3', + color: '#346d6d', + }, + failed: { + backgroundColor: 'transparent', + color: '#fd7890', + }, + awaiting: { + backgroundColor: '#dfebff', + color: '#2e73d9', + }, + statusText: { + marginLeft: 'auto', + textTransform: 'uppercase', + }, +}) diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js b/src/routes/safe/components/TransactionsNew/TxsTable/columns.js index 71c31225..4d31d3c2 100644 --- a/src/routes/safe/components/TransactionsNew/TxsTable/columns.js +++ b/src/routes/safe/components/TransactionsNew/TxsTable/columns.js @@ -33,7 +33,7 @@ export const getTxTableData = (transactions: List): List 0 ? fromWei(toBN(tx.value), 'ether') : 'n/a', - [TX_TABLE_STATUS_ID]: tx.isExecuted ? 'done' : 'peding', + [TX_TABLE_STATUS_ID]: tx.isExecuted ? 'success' : 'pending', })) return rows diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/index.jsx b/src/routes/safe/components/TransactionsNew/TxsTable/index.jsx index 1f60fe8e..2c455389 100644 --- a/src/routes/safe/components/TransactionsNew/TxsTable/index.jsx +++ b/src/routes/safe/components/TransactionsNew/TxsTable/index.jsx @@ -21,6 +21,7 @@ import { getTxTableData, generateColumns, TX_TABLE_NONCE_ID, type BalanceRow, } from './columns' import { styles } from './style' +import Status from './Status' type State = { @@ -64,33 +65,11 @@ class Balances extends React.Component { {row[column.id]} ))} - {/* + - {granted && ( - - )} - + - */} + )) } diff --git a/src/routes/safe/components/TransactionsNew/TxsTable/style.js b/src/routes/safe/components/TransactionsNew/TxsTable/style.js index 46e2c71f..35c7867c 100644 --- a/src/routes/safe/components/TransactionsNew/TxsTable/style.js +++ b/src/routes/safe/components/TransactionsNew/TxsTable/style.js @@ -30,10 +30,6 @@ export const styles = (theme: Object) => ({ backgroundColor: '#fff3e2', }, }, - actions: { - justifyContent: 'flex-end', - visibility: 'hidden', - }, send: { minWidth: '0px', marginRight: sm,