Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #786 from LiskHQ/658-avoid-red-for-good-transactions
Browse files Browse the repository at this point in the history
 Make outgoing transactions black instead of red - Closes #658
  • Loading branch information
slaweet authored Oct 2, 2017
2 parents 178696b + 29348bb commit 47cbe05
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/transactions/amount.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Amount', () => {
.to.have.lengthOf(1);
});

it('should have className "transactions__outButton" for outgoing transaction', () => {
it('should have className "transactions__grayButton" for outgoing transaction', () => {
const inputValue = {
value: {
type: 1,
Expand Down
18 changes: 13 additions & 5 deletions src/components/transactions/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ import { IconButton } from 'react-toolbox/lib/button';
import styles from './transactions.css';

const Status = (props) => {
let template = null;
let iconProps = {};
if (props.value.type === 0 &&
props.value.senderId === props.value.recipientId) {
template = <IconButton icon='replay' disabled={true}/>;
iconProps = {
icon: 'replay',
};
} else if (props.value.senderId !== props.address) {
template = <IconButton icon='call_received' className={styles.in} disabled={true}/>;
iconProps = {
icon: 'call_received',
className: styles.in,
};
} else if (props.value.type !== 0 || props.value.recipientId !== props.address) {
template = <IconButton icon='call_made' className={styles.out} disabled={true}/>;
iconProps = {
icon: 'call_made',
className: styles.out,
};
}
return template;
return <IconButton {...iconProps} disabled={true}/>;
};

export default Status;
6 changes: 1 addition & 5 deletions src/components/transactions/transactions.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:root {
--in: #73c8a9;
--out: #f45d4c;
--out: #777;
--btn: rgb(2, 136, 209);
}

Expand Down Expand Up @@ -29,10 +29,6 @@
text-align: center;
}

.outButton {
background: color(var(--out) alpha(45%)) !important;
}

.in {
color: var(--in) !important;
}
Expand Down

0 comments on commit 47cbe05

Please sign in to comment.