static-cms/src/components/Widgets/ImageControl.js

17 lines
335 B
JavaScript
Raw Normal View History

2016-05-30 16:55:32 -07:00
import React from 'react';
export default class ImageControl extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
}
handleChange(e) {
this.props.onChange(e.target.value);
}
render() {
return <input type="file" onChange={this.handleChange}/>;
}
}