| 1 |
import { styled } from '@elementor/ui/styles'; |
| 2 |
import Button from '@elementor/ui/Button'; |
| 3 |
import FormControl from '@elementor/ui/FormControl'; |
| 4 |
import TextField from '@elementor/ui/TextField'; |
| 5 |
import { __ } from '@wordpress/i18n'; |
| 6 |
import { useSettings } from '../hooks/use-settings'; |
| 7 |
|
| 8 |
const FeedbackForm = ( { close, handleSubmitForm } ) => { |
| 9 |
const { feedback, setFeedback } = useSettings(); |
| 10 |
|
| 11 |
return ( |
| 12 |
<FormControl fullWidth> |
| 13 |
<StyledTextField |
| 14 |
value={ feedback } |
| 15 |
onChange={ ( e ) => setFeedback( e.target.value ) } |
| 16 |
placeholder={ __( 'Share your thoughts on how we can improve Image Optimizer…', 'image-optimization' ) } |
| 17 |
minRows={ 5 } |
| 18 |
multiline /> |
| 19 |
<Button |
| 20 |
color="primary" |
| 21 |
variant="contained" |
| 22 |
onClick={ () => handleSubmitForm( close ) } |
| 23 |
> |
| 24 |
{ __( 'Submit', 'image-optimization' ) } |
| 25 |
</Button> |
| 26 |
</FormControl> |
| 27 |
); |
| 28 |
}; |
| 29 |
|
| 30 |
export default FeedbackForm; |
| 31 |
|
| 32 |
const StyledTextField = styled( TextField )` |
| 33 |
textarea:focus-visible, |
| 34 |
textarea:active { |
| 35 |
outline: none; |
| 36 |
box-shadow: none; |
| 37 |
} |
| 38 |
`; |
| 39 |
|
| 40 |
|