add src/views/avatar-crop-view.jsx

This commit is contained in:
or-else
2021-07-10 15:39:56 -07:00
parent bc6e2ab8d2
commit 6b8c3949a0
+35
View File
@@ -0,0 +1,35 @@
// Edit account parameters.
import React from 'react';
import { FormattedMessage } from 'react-intl';
import Cropper from '../widgets/cropper.jsx';
export default class AvatarCropView extends React.PureComponent {
constructor(props) {
super(props);
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit() {
if (this.props.onSubmit) {
this.props.onSubmit();
}
}
render() {
return (
<div className="panel-form">
<div className="panel-form-row">
<Cropper source="/img/logo192.png" />
</div>
<div className="dialog-buttons">
<button className="primary" onClick={this.handleSubmit}>
<FormattedMessage id="button_ok"
defaultMessage="OK" description="Button [OK]" />
</button>
</div>
</div>
);
}
};