This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devices: Add FloatingButton to open QRCodeModal
- Loading branch information
Showing
8 changed files
with
78 additions
and
22 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
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,25 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import classNames from 'classnames' | ||
|
||
import styles from './FloatingButton.module.scss' | ||
|
||
const FloatingButton = ({ className, children, onClick }) => ( | ||
<div | ||
className={classNames( | ||
className, | ||
[styles.FloatingButton] | ||
)} | ||
onClick={onClick} | ||
> | ||
{children} | ||
</div> | ||
) | ||
|
||
FloatingButton.propTypes = { | ||
className: PropTypes.string, | ||
children: PropTypes.node, | ||
onClick: PropTypes.func | ||
} | ||
|
||
export default FloatingButton |
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,13 @@ | ||
@import '../../styles/colors.scss'; | ||
|
||
.FloatingButton { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 56px; | ||
height: 56px; | ||
border-radius: 50px; | ||
color: white; | ||
background-color: $color-blue; | ||
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.15); | ||
} |
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 { default } from './FloatingButton' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,10 @@ | |
.sidebar { | ||
text-align: left; | ||
} | ||
|
||
.FloatingButton { | ||
position: absolute; | ||
bottom: 16px; | ||
right: 16px; | ||
} | ||
} |
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