forked from binary-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.
Merge pull request #5 from oskar-binary/shared_components
Shared components
- Loading branch information
Showing
11 changed files
with
881 additions
and
376 deletions.
There are no files selected for viewing
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
36 changes: 26 additions & 10 deletions
36
packages/trader/src/App/Containers/AccountManagementModal/Components/layout-components.jsx
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 |
---|---|---|
@@ -1,17 +1,33 @@ | ||
import React from 'react'; | ||
import { Scrollbars } from 'tt-react-custom-scrollbars'; | ||
import classNames from 'classnames'; | ||
import React from 'react'; | ||
import { Scrollbars } from 'tt-react-custom-scrollbars'; | ||
|
||
export const FormFooter = ({ children }) => ( | ||
<div className='account-management-form-footer'>{children}</div> | ||
); | ||
|
||
export const FormBody = ({ children, scroll_offset }) => ( | ||
<Scrollbars | ||
autoHide | ||
style={{ | ||
height: scroll_offset ? `calc(100% - ${scroll_offset})` : '100%', | ||
}} | ||
> | ||
<div className='account-management-form-body'>{children}</div> | ||
</Scrollbars> | ||
<Scrollbars | ||
autoHide | ||
style={{ | ||
height: scroll_offset ? `calc(100% - ${scroll_offset})` : '100%', | ||
}} | ||
> | ||
<div className='account-management-form-body'>{children}</div> | ||
</Scrollbars> | ||
); | ||
|
||
export const FormSubHeader = ({ text }) => ( | ||
<h2 className='account-management-form-header'>{text}</h2> | ||
); | ||
|
||
export const TextContainer = ({ children }) => <div className='account-management-text-container'>{children}</div> | ||
|
||
export const Text = ({ children, size, color, className }) => ( | ||
<p | ||
className={classNames('account-management-text', className, { | ||
'account-management-text--xsmall': size === 'xsmall', | ||
'account-management-text--small': size === 'small', | ||
'account-management-text--grey': color === 'grey', | ||
})}>{children}</p> | ||
); |
Oops, something went wrong.