-
Notifications
You must be signed in to change notification settings - Fork 164
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
Pietro Passarelli - News Labs
committed
Jul 31, 2019
1 parent
36aaf0a
commit a176e54
Showing
5 changed files
with
250 additions
and
4 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
63 changes: 63 additions & 0 deletions
63
packages/components/transcript-editor/src/ExportOptions.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,63 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { faWindowClose } from '@fortawesome/free-solid-svg-icons'; | ||
|
||
import style from './index.module.css'; | ||
|
||
class ExportOptions extends React.Component { | ||
|
||
render() { | ||
const btns = this.props.exportOptionsList.map((opt) => { | ||
return (<><button | ||
title={ opt.label } | ||
className={ style.playerButton } | ||
key={ opt.value } | ||
onClick={ this.props.handleExportOptionsChange } | ||
value={ opt.value }> | ||
{opt.label} | ||
</button> | ||
<br/> | ||
</>); | ||
}); | ||
|
||
return ( | ||
<div className={ style.settings }> | ||
<h2 className={ style.header }>Export Options</h2> | ||
<div className={ style.closeButton } | ||
onClick={ this.props.handleExportToggle } | ||
> | ||
<FontAwesomeIcon icon={ faWindowClose } /> | ||
</div> | ||
|
||
<div className={ style.controlsContainer }> | ||
{btns} | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
ExportOptions.propTypes = { | ||
handleExportToggle: PropTypes.func | ||
// showTimecodes: PropTypes.bool, | ||
// showSpeakers: PropTypes.bool, | ||
// timecodeOffset: PropTypes.number, | ||
// handleShowTimecodes: PropTypes.func, | ||
// handleShowSpeakers: PropTypes.func, | ||
// handleSetTimecodeOffset: PropTypes.func, | ||
// handleSettingsToggle: PropTypes.func, | ||
// handlePauseWhileTyping: PropTypes.func, | ||
// handleIsScrollIntoViewChange: PropTypes.func, | ||
// handleRollBackValueInSeconds: PropTypes.func, | ||
// defaultValueScrollSync: PropTypes.bool, | ||
// defaultValuePauseWhileTyping: PropTypes.bool, | ||
// defaultRollBackValueInSeconds: PropTypes.number, | ||
// previewIsDisplayed: PropTypes.bool, | ||
// handlePreviewIsDisplayed: PropTypes.func, | ||
// // previewViewWidth: PropTypes.string, | ||
// handleChangePreviewViewWidth: PropTypes.func, | ||
// handleAnalyticsEvents: PropTypes.func | ||
}; | ||
|
||
export default ExportOptions; |
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
90 changes: 90 additions & 0 deletions
90
packages/components/transcript-editor/src/index.module.css
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,90 @@ | ||
@value color-darkest-grey from '../../../config/style-guide/colours.module.css'; | ||
|
||
.settings { | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
margin: 0 auto; | ||
width: 30%; | ||
min-width: 300px; | ||
min-height: 300px; | ||
text-align: center; | ||
vertical-align: middle; | ||
color: white; | ||
background: #4a4a4a; | ||
padding: 1em; | ||
font-weight: lighter; | ||
z-index: 2; | ||
} | ||
|
||
.header { | ||
margin-top: 0; | ||
margin-bottom: 1em; | ||
} | ||
|
||
.closeButton { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
padding: 1em; | ||
cursor: pointer; | ||
} | ||
|
||
.controlsContainer { | ||
display: flex; | ||
flex-direction: column; | ||
align-content: flex-start; | ||
align-items: center; | ||
margin: 0 auto; | ||
} | ||
|
||
.settingElement { | ||
text-align: left; | ||
align-self: auto; | ||
margin-bottom: 0.5em; | ||
} | ||
|
||
.label { | ||
display: inline-block; | ||
min-width: 200px; | ||
width: 200px; | ||
} | ||
|
||
.rollbackValue { | ||
height: 2em; | ||
width: 48px; | ||
box-sizing: border-box; | ||
border: none; | ||
text-align: center; | ||
font-weight: bold; | ||
margin-right: 16px; | ||
vertical-align: middle; | ||
} | ||
|
||
.timecodeLabel { | ||
display: block; | ||
text-align: center; | ||
} | ||
|
||
|
||
.playerButton { | ||
width: 48px; | ||
height: 48px; | ||
padding: 0.5em; | ||
border: 0; | ||
color: white; | ||
background: color-darkest-grey; | ||
font-size: 1em; | ||
cursor: pointer; | ||
margin-right: 0.3rem; | ||
margin-top: 0.3rem; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.playerButton { | ||
width: 100%; | ||
height: 48px; | ||
margin: 0; | ||
} |
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