|
3 | 3 | */
|
4 | 4 |
|
5 | 5 | import React from 'react';
|
| 6 | +import PropTypes from 'prop-types'; |
6 | 7 | import createWidget from './lib/createWidget';
|
7 | 8 |
|
8 | 9 | /**
|
@@ -125,37 +126,37 @@ class SoundCloud extends React.Component {
|
125 | 126 | SoundCloud.propTypes = {
|
126 | 127 | // url to play. It's kept in sync, changing it will
|
127 | 128 | // cause the widget to refresh and play the new url.
|
128 |
| - url: React.PropTypes.string.isRequired, |
| 129 | + url: PropTypes.string.isRequired, |
129 | 130 |
|
130 | 131 | // custom ID for widget iframe element
|
131 |
| - id: React.PropTypes.string, |
| 132 | + id: PropTypes.string, |
132 | 133 |
|
133 |
| - height: React.PropTypes.oneOfType([ |
134 |
| - React.PropTypes.string, |
135 |
| - React.PropTypes.number, |
| 134 | + height: PropTypes.oneOfType([ |
| 135 | + PropTypes.string, |
| 136 | + PropTypes.number, |
136 | 137 | ]),
|
137 | 138 |
|
138 | 139 | // 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 |
| 140 | + opts: PropTypes.shape({ |
| 141 | + auto_play: PropTypes.bool, |
| 142 | + visual: PropTypes.bool, |
| 143 | + buying: PropTypes.bool, |
| 144 | + liking: PropTypes.bool, |
| 145 | + download: PropTypes.bool, |
| 146 | + sharing: PropTypes.bool, |
| 147 | + show_artwork: PropTypes.bool, |
| 148 | + show_comments: PropTypes.bool, |
| 149 | + show_playcount: PropTypes.bool, |
| 150 | + show_user: PropTypes.bool, |
| 151 | + show_reposts: PropTypes.bool, |
| 152 | + hide_related: PropTypes.bool, |
| 153 | + callback: PropTypes.func |
153 | 154 | }),
|
154 | 155 |
|
155 | 156 | // event subscriptions
|
156 |
| - onPlay: React.PropTypes.func, |
157 |
| - onPause: React.PropTypes.func, |
158 |
| - onEnd: React.PropTypes.func, |
| 157 | + onPlay: PropTypes.func, |
| 158 | + onPause: PropTypes.func, |
| 159 | + onEnd: PropTypes.func, |
159 | 160 | };
|
160 | 161 |
|
161 | 162 | SoundCloud.defaultProps = {
|
|
0 commit comments