-
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.
- Loading branch information
Thomas Hands
committed
Oct 9, 2019
1 parent
96eda7e
commit f6b9384
Showing
14 changed files
with
894 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.App { | ||
text-align: center; | ||
background-color: rgba(0,0,0,0.8); | ||
height: 100vw; | ||
} |
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,37 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import fp from 'lodash/fp'; | ||
import { MDBBtn } from 'mdbreact'; | ||
import defaultStyles from './Button.module.scss'; | ||
|
||
const StyledButton = props => ( | ||
<MDBBtn | ||
color={props.color} | ||
className={props.styles.Button} | ||
onClick={props.onClick} | ||
type={props.type} | ||
disabled={props.disabled} | ||
> | ||
{props.text} | ||
</MDBBtn> | ||
); | ||
|
||
StyledButton.defaultProps = { | ||
color: 'primary', | ||
onClick: fp.noop, | ||
styles: defaultStyles, | ||
text: 'Button', | ||
type: '', | ||
disabled: false | ||
}; | ||
|
||
StyledButton.propTypes = { | ||
color: PropTypes.string, | ||
onClick: PropTypes.func, | ||
styles: PropTypes.objectOf(PropTypes.string), | ||
text: PropTypes.string, | ||
type: PropTypes.string, | ||
disabled: PropTypes.bool | ||
}; | ||
|
||
export default StyledButton; |
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,3 @@ | ||
.Button{ | ||
height: auto; | ||
} |
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,41 @@ | ||
import React, { useCallback } from 'react'; | ||
import { | ||
MDBDropdown, MDBDropdownToggle, MDBDropdownMenu, MDBDropdownItem | ||
} from 'mdbreact'; | ||
import PropTypes from 'prop-types'; | ||
import fp from 'lodash/fp'; | ||
|
||
const Dropdown = props => { | ||
const clickHandler = useCallback(item => () => props.onItemClick(item), [props]); | ||
|
||
return ( | ||
<MDBDropdown disabled={props.disabled}> | ||
<MDBDropdownToggle color={props.color}> | ||
{props.title} | ||
</MDBDropdownToggle> | ||
<MDBDropdownMenu basic> | ||
{props.items.map(item => ( | ||
<MDBDropdownItem onClick={clickHandler(item)}>{item}</MDBDropdownItem> | ||
))} | ||
</MDBDropdownMenu> | ||
</MDBDropdown> | ||
); | ||
}; | ||
|
||
Dropdown.defaultProps = { | ||
color: 'primary', | ||
title: 'Dropdown', | ||
items: [], | ||
onItemClick: fp.noop, | ||
disabled: false | ||
}; | ||
|
||
Dropdown.propTypes = { | ||
color: PropTypes.string, | ||
title: PropTypes.string, | ||
items: PropTypes.arrayOf(PropTypes.string), | ||
onItemClick: PropTypes.func, | ||
disabled: PropTypes.bool | ||
}; | ||
|
||
export default Dropdown; |
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 |
---|---|---|
|
@@ -47,4 +47,4 @@ Dice.propTypes = { | |
dieSize: PropTypes.number | ||
}; | ||
|
||
export default Dice; | ||
export default Dice; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* eslint-disable jsx-a11y/no-static-element-interactions */ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import fp from 'lodash/fp'; | ||
|
||
import styles from './Shaker.module.scss'; | ||
|
||
const Shaker = props => ( | ||
<div className={styles.perudoCup} onClick={props.onClick}> | ||
<div className={styles.top} style={{ backgroundColor: `${props.topColor}`, boxShadow: `0px 1px ${props.outlineColor}` }} /> | ||
<div | ||
className={styles.middle} | ||
style={{ borderBottom: `300px solid ${props.faceColor}` }} | ||
/> | ||
<div className={styles.bottomRidge} style={{ backgroundColor: `${props.faceColor}` }} /> | ||
<div className={styles.bottom} style={{ backgroundColor: `${props.faceColor}` }} /> | ||
<div className={styles.bottomLip} style={{ backgroundColor: `${props.topColor}` }} /> | ||
</div> | ||
); | ||
|
||
Shaker.defaultProps = { | ||
onClick: fp.noop, | ||
faceColor: '#FF6347', | ||
topColor: '#CF503A', | ||
outlineColor: '#8B0000' | ||
}; | ||
|
||
Shaker.propTypes = { | ||
onClick: PropTypes.func, | ||
faceColor: PropTypes.string, | ||
topColor: PropTypes.string, | ||
outlineColor: PropTypes.string | ||
}; | ||
|
||
|
||
export default Shaker; |
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,63 @@ | ||
.perudoCup { | ||
margin: 60px 0; | ||
position: relative; | ||
cursor: pointer; | ||
} | ||
|
||
.middle { | ||
border-left: 40px solid transparent; | ||
border-right: 40px solid transparent; | ||
border-radius: 10px; | ||
height: 0; | ||
width: 170px; | ||
text-align: center; | ||
font-size: 20px; | ||
} | ||
|
||
.top { | ||
width: 170px; | ||
height: 50px; | ||
-moz-border-radius: 85px / 25px; | ||
-webkit-border-radius: 85px / 25px; | ||
border-radius: 85px / 25px; | ||
position:absolute; | ||
top: -25px; | ||
margin-left: 40px; | ||
} | ||
|
||
.bottom { | ||
width: 256px; | ||
height: 70px; | ||
-moz-border-radius: 125px / 35px; | ||
-webkit-border-radius: 125px / 35px; | ||
border-radius: 125px / 35px; | ||
position: absolute; | ||
top: 250px; | ||
z-index: 2; | ||
margin-left: -3px; | ||
} | ||
|
||
.bottomRidge { | ||
width: 246px; | ||
height: 70px; | ||
-moz-border-radius: 125px / 35px; | ||
-webkit-border-radius: 125px / 35px; | ||
border-radius: 125px / 35px; | ||
position: absolute; | ||
top: 243px; | ||
z-index: 3; | ||
margin-left: 2px; | ||
border-bottom: 2px solid rgba(0,0,0,0.1); | ||
} | ||
|
||
.bottomLip { | ||
width: 254px; | ||
height: 70px; | ||
-moz-border-radius: 125px / 35px; | ||
-webkit-border-radius: 125px / 35px; | ||
border-radius: 125px / 35px; | ||
position: absolute; | ||
top: 255px; | ||
box-shadow: 0px 10px 5px grey; | ||
margin-left: -2px; | ||
} |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import * as actions from './actions'; | ||
|
||
const initState = { | ||
|