Skip to content
Snippets Groups Projects
Commit 5b544bed authored by Jack Reed's avatar Jack Reed Committed by Chris Beer
Browse files

Pass through the annotation as a prop so that a plugin can use this in a much easier way

parent 7a2cb31c
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,11 @@ describe('CanvasAnnotations', () => {
expect(wrapper.find(ListItem).length).toEqual(2);
});
it('pass through the annotation to make plugins life easier', () => {
wrapper = createWrapper({ annotations });
expect(wrapper.find(ListItem).first().dive().props().annotation.id).toEqual('abc123');
});
it('renders nothing when there are no annotations', () => {
wrapper = createWrapper();
expect(wrapper.find(Typography).length).toBe(0);
......
......@@ -75,6 +75,7 @@ export class CanvasAnnotations extends Component {
component={listContainerComponent}
className={classes.annotationListItem}
key={annotation.id}
annotation={annotation}
annotationid={annotation.id}
selected={selectedAnnotationIds.includes(annotation.id)}
onClick={e => this.handleClick(e, annotation)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment