Skip to content

Commit

Permalink
adress history colors refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-eileen committed Oct 31, 2024
1 parent 6a6c6fd commit 8be5952
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/AddressHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import SortableTable from './SortableTable';
import EllipsiCell from './EllipsiCell';
import { ReactComponent as RowBottomIcon } from '../assets/images/leading-icon.svg';
import { ReactComponent as RowTopIcon } from '../assets/images/leading-top-icon.svg';
import { COLORS } from '../constants';

const mapStateToProps = state => ({
decimalPlaces: state.serverInfo.decimal_places,
Expand Down Expand Up @@ -234,7 +235,7 @@ class AddressHistory extends SortableTable {
</td>
<td className="state td-mobile">{statusElement}</td>
<td className="value td-mobile">
<span style={{ color: tx.balance < 0 ? '#991300' : '#44A32E' }}>{prettyValue}</span>
<span style={{ color: tx.balance < 0 ? COLORS.danger : COLORS.success }}>{prettyValue}</span>
</td>
</tr>
);
Expand Down
5 changes: 5 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ export const SCREEN_STATUS_LOOP_INTERVAL_IN_SECONDS = 60; // This is the interva

// Number of elements in the nano contract transaction history table
export const NANO_CONTRACT_TX_HISTORY_COUNT = 5;

export const COLORS = {
danger: '#991300',
success: '#44A32E'
}

0 comments on commit 8be5952

Please sign in to comment.