Skip to content

Commit c376987

Browse files
committed
update opts PropTypes to allow passing callback for widget load
1 parent 1d13d55 commit c376987

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/SoundCloud.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,22 @@ SoundCloud.propTypes = {
135135
React.PropTypes.number,
136136
]),
137137

138-
// widget parameters for appearance and auto play.
139-
opts: React.PropTypes.objectOf(React.PropTypes.bool),
138+
// widget parameters: appearance, auto play, and callback for SC.Widget.load()
139+
opts: React.PropTypes.shape({
140+
auto_play: React.PropTypes.bool,
141+
visual: React.PropTypes.bool,
142+
buying: React.PropTypes.bool,
143+
liking: React.PropTypes.bool,
144+
download: React.PropTypes.bool,
145+
sharing: React.PropTypes.bool,
146+
show_artwork: React.PropTypes.bool,
147+
show_comments: React.PropTypes.bool,
148+
show_playcount: React.PropTypes.bool,
149+
show_user: React.PropTypes.bool,
150+
show_reposts: React.PropTypes.bool,
151+
hide_related: React.PropTypes.bool,
152+
callback: React.PropTypes.func
153+
}),
140154

141155
// event subscriptions
142156
onPlay: React.PropTypes.func,

0 commit comments

Comments
 (0)