Skip to content

Commit

Permalink
Add style prop
Browse files Browse the repository at this point in the history
  • Loading branch information
webmiraclepro committed Aug 3, 2016
1 parent 14571c1 commit 6aabbde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ Prop | Description | Default
`volume` | Sets the volume of the appropriate player | `0.8`
`width` | Sets the width of the player | `640`
`height` | Sets the height of the player | `360`
`className` | Pass in a `className` to set on the top level element
`className` | Pass in a `className` to set on the root element
`style` | Add [inline styles](https://facebook.github.io/react/tips/inline-styles.html) to the root element
`progressFrequency` | The time between `onProgress` callbacks, in milliseconds | `1000`

#### Callback props
Expand Down
1 change: 1 addition & 0 deletions src/ReactPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class ReactPlayer extends Component {
}
render () {
const style = {
...this.props.style,
width: this.props.width,
height: this.props.height
}
Expand Down
1 change: 1 addition & 0 deletions src/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const propTypes = {
width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
height: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
className: PropTypes.string,
style: PropTypes.object,
progressFrequency: PropTypes.number,
soundcloudConfig: PropTypes.shape({
clientId: PropTypes.string
Expand Down

0 comments on commit 6aabbde

Please sign in to comment.