react-image-annotation
react-image-annotation copied to clipboard
Adds a prop for input text area
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.
@Secretmapper Your feedback will be much appreciated.