From 8d1380aa01faa3e39bb41904ada5e22152c7e974 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Fri, 4 Oct 2019 18:26:33 +0300 Subject: [PATCH] breaking(web): support forwardedRef --- src/ReactNativeSVG.web.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ReactNativeSVG.web.ts b/src/ReactNativeSVG.web.ts index faf681ff..c2f8b1d6 100644 --- a/src/ReactNativeSVG.web.ts +++ b/src/ReactNativeSVG.web.ts @@ -25,6 +25,7 @@ function prepare(props) { fontWeight, fontStyle, style, + forwardedRef, ...clean } = props; @@ -57,6 +58,10 @@ function prepare(props) { clean.transform = transform.join(' '); } + if (forwardedRef) { + clean.ref = forwardedRef; + } + const styles: { fontStyle?: string; fontFamily?: string;