From fa967c98a2fcd120aef228a10939572ee5ee3140 Mon Sep 17 00:00:00 2001
From: Lucas Moeskops <lucasmoeskops@gmail.com>
Date: Fri, 11 Mar 2022 14:36:56 +0100
Subject: [PATCH] Different prop types options for defaults

Currently, the default properties of annotations include booleans ("closed"), functions ("updateGeometry"), numbers ("strokeWidth") and strings (e.g. "activeTool"). This PR changes the AnnotationCreation prop types to not raise a warning when one of these is overwritten.
---
 src/AnnotationCreation.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/AnnotationCreation.js b/src/AnnotationCreation.js
index f5e5995..913d8bf 100644
--- a/src/AnnotationCreation.js
+++ b/src/AnnotationCreation.js
@@ -449,7 +449,7 @@ AnnotationCreation.propTypes = {
   config: PropTypes.shape({
     annotation: PropTypes.shape({
       adapter: PropTypes.func,
-      defaults: PropTypes.objectOf(PropTypes.string),
+      defaults: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.bool, PropTypes.func, PropTypes.number, PropTypes.string])),
     }),
   }).isRequired,
   id: PropTypes.string.isRequired,
-- 
GitLab