react-image-annotation icon indicating copy to clipboard operation
react-image-annotation copied to clipboard

Adds a prop for input text area

Open utkarsh867 opened this issue 5 years ago • 1 comments

Use Case

I wanted to annotate data, but I wanted a dropdown instead of a text area.

I observed that it was not possible to change the text area without implementing the complete TextEditor component.

This change now allows me to provide a React Component as a prop.

<Annotation
  src={img}
  annotations={annotations}
  value={annotation}
  onChange={setCurrentAnnotation}
  onSubmit={onSubmit}
  renderInputArea={props => <LabelInputArea {...props} />}
/>

I have not written any tests yet.

utkarsh867 avatar May 27 '20 18:05 utkarsh867

@Secretmapper Your feedback will be much appreciated.

utkarsh867 avatar Jun 02 '20 06:06 utkarsh867