forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make it single responsibility component
- Loading branch information
1 parent
d06e58c
commit 52ba11e
Showing
6 changed files
with
39 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
packages/trader/src/AppV2/Components/InfoModal/info-modal.tsx
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/trader/src/AppV2/Components/PayoutInfoModal/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import PayoutInfoModal from './payout-info-modal'; | ||
import './payout-info-modal.scss'; | ||
|
||
export default PayoutInfoModal; |
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
packages/trader/src/AppV2/Components/PayoutInfoModal/payout-info-modal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { CaptionText, Modal } from '@deriv-com/quill-ui'; | ||
import { Localize } from '@deriv/translations'; | ||
import React from 'react'; | ||
|
||
const PayoutInfoModal = () => { | ||
const [isVisible, setIsVisible] = React.useState(false); | ||
return ( | ||
<> | ||
<button onClick={() => setIsVisible(!isVisible)}> | ||
<CaptionText size='sm' bold underlined className='payout-info-text'> | ||
<Localize i18n_default_text='How do I earn a payout?' /> | ||
</CaptionText> | ||
</button> | ||
<Modal | ||
isOpened={isVisible} | ||
toggleModal={setIsVisible} | ||
primaryButtonLabel={<Localize i18n_default_text='Got it' />} | ||
shouldCloseOnPrimaryButtonClick | ||
isMobile | ||
showHandleBar | ||
> | ||
<Modal.Header title={<Localize i18n_default_text='How do I earn a payout?' />} /> | ||
<Modal.Body> | ||
{ | ||
<Localize i18n_default_text='After the entry spot tick, your stake will grow continuously by 1% for every tick that the spot price remains within the ± 0.06444% from the previous spot price.' /> | ||
} | ||
</Modal.Body> | ||
</Modal> | ||
</> | ||
); | ||
}; | ||
|
||
export default PayoutInfoModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters