Skip to content

Commit

Permalink
Merge pull request deriv-com#24 from khalid-deriv/p2p
Browse files Browse the repository at this point in the history
Letting the overflowing text in filter modal know who is the boss
  • Loading branch information
carolsachdeva authored Feb 18, 2022
2 parents 61ae5c3 + 0489859 commit e5b221b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/p2p/src/components/buy-sell/filter-modal/filter-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ const FilterModal = () => {
</React.Fragment>
) : (
<React.Fragment>
<div className='filter-modal__row'>
<div
className='filter-modal__row filter-modal__select'
onClick={() => buy_sell_store.setShowFilterPaymentMethods(true)}
>
<div className='filter-modal__column'>
<Text color='prominent' size='xs'>
<Localize i18n_default_text='Payment methods' />
Expand All @@ -101,16 +104,16 @@ const FilterModal = () => {
<Localize i18n_default_text='All' />
</Text>
) : (
<Text color='less-prominent' size='xs'>
<Text
className='filter-modal__selected-payment-methods'
color='less-prominent'
size='xs'
>
{selected_methods_text.join(', ')}
</Text>
)}
</div>
<Icon
icon='IcChevronRight'
onClick={() => buy_sell_store.setShowFilterPaymentMethods(true)}
size={18}
/>
<Icon className='filter-modal__arrow' icon='IcChevronRight' size={18} />
</div>
<div className='filter-modal__row'>
<div className='filter-modal__column'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
&__column {
display: flex;
flex-direction: column;
@media (max-width: 450px) {
width: 80%;
}
}

&__select {
cursor: pointer;
}

&__arrow {
min-width: 1.8rem;
min-height: 1.8rem;
}

&__selected-payment-methods {
max-width: 350px;
max-height: 45px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;

@media (max-width: 450px) {
max-width: 300px;
}
@media (max-width: 400px) {
max-width: 250px;
}
}

&__footer {
Expand All @@ -19,6 +46,10 @@
justify-content: space-between;
min-height: 8rem;
padding: 0 2.4rem;
@media (max-width: 375px) {
padding: 0 0 0 1.5rem;
justify-content: initial;
}
}

&__toggle {
Expand Down

0 comments on commit e5b221b

Please sign in to comment.