Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const React = require('react')
const ReactAvatarEditor = require('react-avatar-editor').default
const semantic = require('semantic-ui-react')
class CustomAvatarEditor extends React.Component {
state = {
position: { x: 0.5, y: 0.5 },
scale: 1,
rotate: 0,
borderRadius: 0,
width: 200,
height: 200
}
handleScale = (e) => {
const scale = parseFloat(e.target.value)
this.setState({ scale })
}