Skip to content

Commit f4531c7

Browse files
committed
add posibility to provide single child to Controls
1 parent 66e16c2 commit f4531c7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

demo/src/components/index/main/Main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var videos = [
99
'http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov',
1010
'http://media.w3.org/2010/05/sintel/trailer.mp4',
1111
'http://media.w3.org/2010/05/video/movie_300.mp4',
12-
// Purposefully not a video to deomnstrate source error state
12+
// Purposefully not a video to demonstrate source error state
1313
'https://github.com/mderrick/react-html5video'
1414
];
1515

@@ -94,7 +94,7 @@ var Main = React.createClass({
9494
</Video>
9595
</div>
9696
<div className="main__cols">
97-
<div className="main__col1">
97+
<div className="main__col1">
9898
<h2 className="main__h2">Change Video Source</h2>
9999
<ul className="main__ul">
100100
<li><Button active={this.state.videoId === 0} onClick={this.showVideo.bind(this, 0)}>1</Button></li>

src/components/controls/Controls.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ var Controls = React.createClass({
99

1010
propTypes: {
1111
error: React.PropTypes.bool,
12-
children: React.PropTypes.arrayOf(React.PropTypes.node)
12+
children: React.PropTypes.oneOfType([
13+
React.PropTypes.arrayOf(React.PropTypes.node),
14+
React.PropTypes.node
15+
])
1316
},
1417

1518
getDefaultProps() {

0 commit comments

Comments
 (0)