Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 13 additions & 4 deletions components/exchange-rate-row/exchange-rate-row.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
padding: 5px;
border-radius: 6px;
letter-spacing: 2px;
height: 80px;
}
.exchange_rate_row:hover {
transform: scale(1.015);
Expand All @@ -33,6 +34,10 @@
}
.currency_wrapper__image {
margin: auto 0;
width: 50px;
height: 50px;
background-color: rgb(235, 8, 133);
border-radius: 50%;
}

@media only screen and (max-width: 1200px) {
Expand All @@ -45,10 +50,7 @@
}
@media only screen and (max-width: 600px) {
/*Big smartphones [426px -> 600px]*/
.currency_wrapper__image {
width: 40px;
height: 40px;
}

.exchange_rate_row__arrow {
font-size: 25px;
}
Expand All @@ -58,4 +60,11 @@
.exchange_rate_row__arrow {
font-size: 15px;
}
.currency_wrapper__normalized_number {
font-size: 25px;
}
.currency_wrapper__image {
width: 30px;
height: 30px;
}
}
28 changes: 6 additions & 22 deletions components/exchange-rate-row/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import React from 'react';
import styles from './exchange-rate-row.module.css';

const ExcgangeRateRow = ({
first_currency,
first_image,
second_currency,
second_image,
normalized_number,
}) => {
const ExcgangeRateRow = ({ src, target, value }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you meant ExchangeRateRow... The spelling of Exchange...

const {
exchange_rate_row,
currency_wrapper,
Expand All @@ -19,24 +13,14 @@ const ExcgangeRateRow = ({
return (
<div className={exchange_rate_row}>
<div className={currency_wrapper}>
<div className={currency_wrapper__normalized_number}>
{normalized_number}
</div>
<div className={currency_wrapper__name}>{first_currency}</div>
<img
src={first_image}
alt={first_currency}
className={currency_wrapper__image}
/>
<div className={currency_wrapper__normalized_number}>{value}</div>
<div className={currency_wrapper__name}>{src.name}</div>
<div className={currency_wrapper__image} />
</div>
<span className={exchange_rate_row__arrow}>&#8667;</span>
<div className={currency_wrapper}>
<div className={currency_wrapper__name}>{second_currency}</div>
<img
src={second_image}
alt={second_currency}
className={currency_wrapper__image}
/>
<div className={currency_wrapper__name}>{target.name}</div>
<div className={currency_wrapper__image} />
</div>
</div>
);
Expand Down
20 changes: 6 additions & 14 deletions mock/currency/index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
const currencies = [
{
id: 'brace',
name: 'Brace',
image: 'src',
sellingPrice: 10,
byingPrice: 52,
id: 'brass',
name: 'Brass',
quantity: 15,
},
{
id: 'gold',
name: 'Gold',
image: 'src',
sellingPrice: 10,
byingPrice: 52,
quantity: 15,
},
{
id: 'silver',
name: 'Silver',
image: 'src',
sellingPrice: 10,
byingPrice: 52,
quantity: 15,
},
{
id: 'ruby',
name: 'Ruby',
image: 'src',
sellingPrice: 10,
byingPrice: 52,
quantity: 15,
},
];

Expand Down
62 changes: 36 additions & 26 deletions mock/exchange-rates/index.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
const exchangeRates = [
{
id: 'b-g',
first_currency: 'Brace',
first_image:
'https://img.icons8.com/fluent/48/000000/assassins-creed-logo.png',
second_currency: 'Gold',
second_image: 'https://img.icons8.com/fluent/48/000000/battle-net.png',
normalized_number: 5,
src: {
id: 'brass',
name: 'Brass',
},
target: {
id: 'gold',
name: 'Gold',
},
value: 15,
},
{
id: 'g-a',
first_currency: 'Brace',
first_image: 'https://img.icons8.com/fluent/48/000000/apex-legends.png',
second_currency: 'Gold',
second_image:
'https://img.icons8.com/fluent/48/000000/nvidia-broadcast.png',
normalized_number: 5,
src: {
id: 'brass',
name: 'Brass',
},
target: {
id: 'gold',
name: 'Gold',
},
value: 15,
},
{
id: 'x-y',
first_currency: 'Brace',
first_image: 'https://img.icons8.com/fluent/48/000000/origin.png',
second_currency: 'Gold',
second_image: 'https://img.icons8.com/fluent/48/000000/uplay-app.png',
normalized_number: 5,
src: {
id: 'brass',
name: 'Brass',
},
target: {
id: 'gold',
name: 'Gold',
},
value: 15,
},
{
id: 'z-c',
first_currency: 'Brace',
first_image: 'https://img.icons8.com/fluent/48/000000/ethereum.png',
second_currency: 'Gold',
second_image: 'https://img.icons8.com/fluent/48/000000/peercoin.png',
normalized_number: 5,
src: {
id: 'brass',
name: 'Brass',
},
target: {
id: 'gold',
name: 'Gold',
},
value: 15,
},
];

Expand Down
Loading