import { Component } from 'react'; import React from 'react'; import './ImageScrollbar.css'; import PropTypes from 'prop-types'; class ImageScrollbar extends Component { constructor(props) { super(props); this.onChange = this.onChange.bind(this); } render() { this.style = { width: `${this.props.height}` }; return (
); } onChange(event) { const intValue = parseInt(event.target.value, 10); this.props.onInputCallback(intValue); } } ImageScrollbar.propTypes = { value: PropTypes.number.isRequired, onInputCallback: PropTypes.func.isRequired }; export default ImageScrollbar;