1 import React
, { Component
} from 'react';
2 import SignaturePreview
from './SignaturePreview/SignaturePreview';
3 import SignatureForm
from './SignatureForm/SignatureForm';
4 import './SignatureCreator.css';
6 class SignatureCreator
extends Component
{
10 // Hard-coded initial state, hopefully some day...
13 position
: 'Front End Developer'
17 handleFormChange
= (e
) => {
18 const { name
, value
} = e
.target
;
20 this.setState({...this.state
, [name
]: value
});
23 handleFormSubmit
= (e
) => {
29 <div className
='SignatureCreator'>
30 <SignaturePreview data
={this.state
} />
32 onChange
={this.handleFormChange
}
33 onSubmit
={this.handleFormSubmit
}
34 className
='SignatureCreator-form' />
40 export default SignatureCreator
;