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

Make outgoing transactions black instead of red - Closes #658 #786

Merged
merged 3 commits into from
Oct 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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