Skip to content

Commit

Permalink
Ameerul /Bug 69674 Improve floating rate field to handle large rate v…
Browse files Browse the repository at this point in the history
…alues (deriv-com#6286)

* changed the margin-top for mobile view for buy-sell

* merging upstream master

* changed the payment methods list modal and wrapped the text for long bank names

* reverted changes

* changed floating rate field and ad type styling

* removed code from other PR

* changed input field value text

* removed local currency from market rate

* changed floating rate spec file

* changed floating rate msg font size to small

* fixed font size
  • Loading branch information
ameerul-deriv authored and adrienne-deriv committed Oct 25, 2022
1 parent 2aef98b commit 805c307
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ describe('<FloatingRate/>', () => {
it('should render the exchange rate in hint', () => {
render(<FloatingRate fiat_currency='AED' local_currency='INR' />);

expect(screen.getByText('1 AED = 100.00 INR')).toBeInTheDocument();
expect(screen.getByText('1 AED = 100.00')).toBeInTheDocument();
});
});
5 changes: 2 additions & 3 deletions packages/p2p/src/components/floating-rate/floating-rate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,14 @@ const FloatingRate = ({
</Text>
<Text
as='span'
size='xs'
size='xxs'
color='prominent'
weight='normal'
line_height='xs'
className='floating-rate__mkt-rate--msg'
>
1 {fiat_currency} ={' '}
{removeTrailingZeros(formatMoney(local_currency, floating_rate_store.exchange_rate, true, 6))}{' '}
{local_currency}
{removeTrailingZeros(formatMoney(local_currency, floating_rate_store.exchange_rate, true, 6))}
</Text>
</div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
height: 18px;
left: 8px;
top: 18px;
font-style: normal;
flex: none;
order: 2;
flex-grow: 0;
Expand Down Expand Up @@ -143,6 +142,7 @@
border: unset;
background-color: unset;
padding: unset;
font-size: small;
&:focus {
border-color: unset;
}
Expand Down
8 changes: 6 additions & 2 deletions packages/p2p/src/components/my-ads/ad-type.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
.ad-type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;

@include mobile {
justify-content: flex-end;
}

&__badge {
align-items: center;
border-radius: 0.4rem;
border: 1px solid var(--border-normal);
display: flex;
flex-direction: row;
margin: 0.25rem;
margin: 0.3rem 0.5rem 0.3rem 0;
padding: 0.1rem 0.8rem;
width: fit-content;
}
Expand Down

0 comments on commit 805c307

Please sign in to comment.