diff --git a/examples/custom-handles.js b/examples/custom-handles.js index 7a50e90..1475c8b 100644 --- a/examples/custom-handles.js +++ b/examples/custom-handles.js @@ -18,16 +18,19 @@ const handleStyle = { textAlign: 'center', }; -const CustomHandle = props => { - const style = Object.assign({ left: `${props.offset}%` }, handleStyle); - return ( -
val: {props.value}
- ); -}; -CustomHandle.propTypes = { - value: React.PropTypes.any, - offset: React.PropTypes.number, -}; +const CustomHandle = React.createClass({ + propTypes: { + value: React.PropTypes.any, + offset: React.PropTypes.number, + }, + render() { + const props = this.props; + const style = Object.assign({ left: `${props.offset}%` }, handleStyle); + return ( +
val: {props.value}
+ ); + }, +}); ReactDOM.render(