Skip to content

Commit

Permalink
Merge pull request #6 from fbaiodias/adding_design_to_component
Browse files Browse the repository at this point in the history
Adding design to component
  • Loading branch information
fbaiodias authored Mar 22, 2018
2 parents 9e5e514 + 77bd452 commit 4f19539
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 37 deletions.
5 changes: 3 additions & 2 deletions src/defaults/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import styled from 'styled-components'
const Button = styled.button`
background: ${props => props.backgroundColor};
color: ${props => props.color};
border-radius: 3px;
padding: 10px 15px;
border-radius: 4px;
padding: 10px 18px;
border: none;
margin: 5px;
font-size: 18px;
font-weight: bold;
outline: none;
cursor: pointer;
`
Expand Down
23 changes: 17 additions & 6 deletions src/defaults/buttonRec.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
import React from 'react'
import styled from 'styled-components'

const Button = styled.button`
background: ${props => props.backgroundColor};
color: ${props => props.color};
border-radius: 100px;
margin: 5px;
width: 54px;
height: 54px;
border-radius: 50%;
width: 44px;
height: 44px;
background: #e55226;
border: 6px solid white;
outline: none;
border: none;
cursor: pointer;
`

const DivBorder = styled.div`
border: 6px solid rgba(255, 255, 255, 0.4);
height: 44px;
width: 44px;
border-radius: 50%;
`

Button.defaultProps = {
color: 'black',
backgroundColor: 'white'
}

export default Button
export default props => (
<DivBorder>
<Button {...props} />
</DivBorder>
)
23 changes: 17 additions & 6 deletions src/defaults/buttonStop.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
import React from 'react'
import styled from 'styled-components'

const Button = styled.button`
background: ${props => props.backgroundColor};
color: ${props => props.color};
border-radius: 6px;
margin: 5px;
width: 54px;
height: 54px;
border-radius: 4px;
width: 44px;
height: 44px;
background: #e55226;
border: 6px solid white;
outline: none;
border: none;
cursor: pointer;
`

const DivBorder = styled.div`
border: 6px solid rgba(255, 255, 255, 0.4);
height: 44px;
width: 44px;
border-radius: 10px;
`

Button.defaultProps = {
color: 'black',
backgroundColor: 'white'
}

export default Button
export default props => (
<DivBorder>
<Button {...props} />
</DivBorder>
)
43 changes: 25 additions & 18 deletions src/defaults/disconnected-view.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/defaults/render-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ActionsWrapper = styled.div`
align-items: center;
justify-content: center;
padding-top: 20px;
padding-bottom: 30px;
padding-bottom: 40px;
`

export default ({
Expand Down Expand Up @@ -53,7 +53,7 @@ export default ({
)
}

return <Button onClick={onTurnOnCamera}>Answer this question</Button>
return <Button onClick={onTurnOnCamera}>🎥 Answer</Button>
}

return <ActionsWrapper>{renderContent()}</ActionsWrapper>
Expand Down
5 changes: 2 additions & 3 deletions src/video-recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const Wrapper = styled.div`
overflow: hidden;
min-height: 119px;
background-color: #000;
color: white;
`

const CameraView = styled.div`
Expand Down Expand Up @@ -123,9 +124,7 @@ export default class VideoRecorder extends Component {
streamIsReady: false,
isInlineRecordingSupported,
isVideoInputSupported,
stream: undefined,
showInstallModal: false,
installClicked: false
stream: undefined
}

this.handleSuccess = this.handleSuccess.bind(this)
Expand Down

0 comments on commit 4f19539

Please sign in to comment.