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
Showing
11 changed files
with
526 additions
and
324 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"jasmine": true | ||
}, | ||
"extends": ["react-app"], | ||
"plugins": ["prettier", "react", "jasmine"] | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"jasmine": true | ||
}, | ||
"extends": ["react-app"], | ||
"plugins": ["prettier", "react", "jasmine"] | ||
} |
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,43 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import Portal from 'react-portal'; | ||
import styles from './styles.module.css'; | ||
|
||
import Button from 'components/Button'; | ||
|
||
const propTypes = { | ||
downloadUrls: PropTypes.array.isRequired, | ||
}; | ||
|
||
/* ================================ Toolbar ================================ */ | ||
function Downloads(props) { | ||
const { downloadUrls } = props; | ||
return ( | ||
<div className={styles.downloads}> | ||
<h2>Downloads</h2> | ||
<ul> | ||
{downloadUrls.map((url, i) => ( | ||
<li> | ||
<audio src={url} controls /> | ||
<Button | ||
key={`download-${i}`} | ||
href={url} | ||
download={url} | ||
hasBorder | ||
darkHover | ||
color={'#f1f1f1'} | ||
title={`download-${i}`} | ||
> | ||
{`download-${i}`} | ||
</Button> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
} | ||
|
||
Downloads.propTypes = propTypes; | ||
|
||
export default Downloads; |
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,31 @@ | ||
import React from 'react'; | ||
import ControlsComponent from './Component'; | ||
|
||
class ControlsContainer extends React.Component { | ||
constructor (props) { | ||
super(props); | ||
this.state = { | ||
isColorPickerOpen: false, | ||
}; | ||
|
||
this.handleColorSelectClick = this.handleColorSelectClick.bind(this); | ||
} | ||
|
||
handleColorSelectClick () { | ||
this.setState({ | ||
isColorPickerOpen: !this.state.isColorPickerOpen, | ||
}); | ||
} | ||
|
||
render () { | ||
return ( | ||
<ControlsComponent | ||
onColorSelectClick={this.handleColorSelectClick} | ||
isColorPickerOpen={this.state.isColorPickerOpen} | ||
{...this.props} | ||
/> | ||
); | ||
} | ||
} | ||
|
||
export default ControlsContainer; |
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,8 @@ | ||
import React from 'react'; | ||
import ControlsContainer from './Container'; | ||
|
||
function Controls (props) { | ||
return <ControlsContainer {...props} />; | ||
} | ||
|
||
export default Controls; |
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,14 @@ | ||
.downloads { | ||
position: absolute; | ||
z-index: 200; | ||
left: 0; | ||
padding: 20px; | ||
top: 100px; | ||
background: white; | ||
} | ||
|
||
.downloads a { | ||
display: block; | ||
margin: 10px 0; | ||
border: 1px solid #ddd; | ||
} |
Oops, something went wrong.