-
Notifications
You must be signed in to change notification settings - Fork 298
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 #71 from binary-com/dev
V20190520_0
- Loading branch information
Showing
88 changed files
with
1,891 additions
and
955 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
38 changes: 38 additions & 0 deletions
38
src/javascript/app/App/Components/Animations/fade-wrapper.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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import posed, | ||
{ PoseGroup } from 'react-pose'; | ||
|
||
const FadeDiv = posed.div({ | ||
enter: { | ||
opacity : 1, | ||
transition: { duration: 300 }, | ||
}, | ||
exit: { | ||
opacity : 0, | ||
transition: { duration: 300 }, | ||
}, | ||
}); | ||
|
||
const FadeWrapper = ({ | ||
children, | ||
className, | ||
keyname, | ||
is_visible, | ||
}) => ( | ||
<PoseGroup> | ||
{is_visible && | ||
<FadeDiv className={className} key={keyname}> | ||
{children} | ||
</FadeDiv> | ||
} | ||
</PoseGroup> | ||
); | ||
|
||
FadeWrapper.propTypes = { | ||
children : PropTypes.node, | ||
is_visible: PropTypes.bool, | ||
keyname : PropTypes.string, | ||
}; | ||
|
||
export { FadeWrapper }; |
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 @@ | ||
export * from './fade-wrapper.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
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
File renamed without changes.
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
7 changes: 4 additions & 3 deletions
7
...ts/Elements/ToastMessage/close-button.jsx → ...ents/NotificationMessage/close-button.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,16 +1,17 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
|
||
const CloseButton = ({ onClick }) => ( | ||
const CloseButton = ({ onClick, className }) => ( | ||
<button | ||
className='toast__close-button' | ||
className={className} | ||
type='button' | ||
onClick={onClick} | ||
/> | ||
); | ||
|
||
CloseButton.propTypes = { | ||
onClick: PropTypes.func.isRequired, | ||
className: PropTypes.string, | ||
onClick : PropTypes.func.isRequired, | ||
}; | ||
|
||
export default CloseButton; |
23 changes: 23 additions & 0 deletions
23
src/javascript/app/App/Components/Elements/NotificationMessage/constants.js
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,23 @@ | ||
export const default_delay = 3000; | ||
|
||
export const max_display_notifications = 3; | ||
|
||
export const types = { | ||
danger : 'notification--danger', | ||
info : 'notification--info', | ||
success : 'notification--success', | ||
warning : 'notification--warning', | ||
contract_sold: 'notification--info', | ||
}; | ||
|
||
export const sortNotifications = (() => { | ||
const notification_order = { | ||
contract_sold: 1, | ||
danger : 2, | ||
warning : 3, | ||
info : 4, | ||
success : 5, | ||
}; | ||
|
||
return (a, b) => notification_order[a.type] - notification_order[b.type]; | ||
})(); |
2 changes: 2 additions & 0 deletions
2
src/javascript/app/App/Components/Elements/NotificationMessage/index.js
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,2 @@ | ||
export default from './notification.jsx'; | ||
export * from './constants.js'; |
Oops, something went wrong.