Skip to content

Commit

Permalink
Merge pull request #73 from nada-deriv/nada/P2PS-1915/alignment-issue
Browse files Browse the repository at this point in the history
fix: issue with alignment of footer buttons
  • Loading branch information
farrah-deriv committed Nov 15, 2023
2 parents 9f63766 + 4fb655e commit a5520cf
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import MyAdsFloatingRateSwitchModal from './my-ads-floating-rate-switch-modal';
import './my-ads-floating-rate-switch-modal.scss';

export default MyAdsFloatingRateSwitchModal;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.my-ads-floating-rate-switch-modal {
.dc-modal__container_my-ads-floating-rate-switch-modal {
@include mobile {
min-width: 328px !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,38 @@ const MyAdsFloatingRateSwitchModal = () => {
const { selected_ad_type, toggleMyAdsRateSwitchModal } = my_ads_store;

return (
<React.Fragment>
<Modal is_open={is_modal_open} toggleModal={hideModal} small className='my-ads-floating-rate-switch-modal'>
<Modal.Body>
{rate_type === ad_type.FLOAT ? (
<Localize i18n_default_text='Set a floating rate for your ad.' />
) : (
<Localize i18n_default_text='Set a fixed rate for your ad.' />
)}
</Modal.Body>
<Modal.Footer>
<Button.Group>
<Button
secondary
type='button'
onClick={() => toggleMyAdsRateSwitchModal(selected_ad_type, !reached_target_date)}
large
>
{reached_target_date ? (
<Localize i18n_default_text='Cancel' />
) : (
<Localize i18n_default_text="I'll do this later" />
)}
</Button>
<Button primary large onClick={() => toggleMyAdsRateSwitchModal(rate_type, true)}>
{rate_type === ad_type.FLOAT ? (
<Localize i18n_default_text='Set floating rate' />
) : (
<Localize i18n_default_text='Set fixed rate' />
)}
</Button>
</Button.Group>
</Modal.Footer>
</Modal>
</React.Fragment>
<Modal is_open={is_modal_open} toggleModal={hideModal} small className='my-ads-floating-rate-switch-modal'>
<Modal.Body>
{rate_type === ad_type.FLOAT ? (
<Localize i18n_default_text='Set a floating rate for your ad.' />
) : (
<Localize i18n_default_text='Set a fixed rate for your ad.' />
)}
</Modal.Body>
<Modal.Footer>
<Button.Group>
<Button
secondary
type='button'
onClick={() => toggleMyAdsRateSwitchModal(selected_ad_type, !reached_target_date)}
large
>
{reached_target_date ? (
<Localize i18n_default_text='Cancel' />
) : (
<Localize i18n_default_text="I'll do this later" />
)}
</Button>
<Button primary large onClick={() => toggleMyAdsRateSwitchModal(rate_type, true)}>
{rate_type === ad_type.FLOAT ? (
<Localize i18n_default_text='Set floating rate' />
) : (
<Localize i18n_default_text='Set fixed rate' />
)}
</Button>
</Button.Group>
</Modal.Footer>
</Modal>
);
};

Expand Down

0 comments on commit a5520cf

Please sign in to comment.