import React from 'react';
import {FormField} from '@workday/canvas-kit-react/form-field';
import {TextArea} from '@workday/canvas-kit-react/text-area';

export default () => {
  const [value, setValue] = React.useState('');

  const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {
    setValue(event.target.value);
  };

  return (
    <FormField label="Leave a Review" labelPosition={FormField.LabelPosition.Left}>
      <TextArea onChange={handleChange} value={value} />
    </FormField>
  );
};
