wip on react transition

This commit is contained in:
Erik Ziegler committed 2018-11-30 11:40:16 -05:00
1 parent 5a4deedda8
commit 7425c2beb8
36 files changed
+1676 -251

No files matched your search

@@ -0,0 +1,47 @@
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 (
<div className="scroll">
<div className="scroll-holder">
<input
className="imageSlider"
style={this.style}
type="range"
min="0"
max={this.props.max}
step="1"
value={this.props.value}
onChange={this.onChange}
/>
</div>
</div>
);
}
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;