Skip to content

Commit

Permalink
feat(annotation): add toast feedback to annotation templates (#18116)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Jan 24, 2022
1 parent 4b89ac7 commit 9fa2812
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { AnnotationLayerObject } from './types';

interface AnnotationLayerModalProps {
addDangerToast: (msg: string) => void;
addSuccessToast: (msg: string) => void;
layer?: AnnotationLayerObject | null;
onLayerAdd?: (layer?: AnnotationLayerObject) => void;
onHide: () => void;
Expand Down Expand Up @@ -80,6 +81,7 @@ const LayerContainer = styled.div`

const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
addDangerToast,
addSuccessToast,
onLayerAdd,
onHide,
show,
Expand Down Expand Up @@ -134,6 +136,7 @@ const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
}

hide();
addSuccessToast(t('Annotation template updated'));
});
}
} else if (currentLayer) {
Expand All @@ -148,6 +151,7 @@ const AnnotationLayerModal: FunctionComponent<AnnotationLayerModalProps> = ({
}

hide();
addSuccessToast(t('Annotation template created'));
});
}
};
Expand Down

0 comments on commit 9fa2812

Please sign in to comment.