From aac3dc014e8afd6ebc11a5cb5ca09dd64aca3842 Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Mon, 9 Dec 2019 21:29:07 +0200 Subject: [PATCH] chore: generate flow types from ts definitions --- src/ReactNativeSVG.web.ts | 2 +- src/index.js.flow | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/ReactNativeSVG.web.ts b/src/ReactNativeSVG.web.ts index b8c399d9..0885adc1 100644 --- a/src/ReactNativeSVG.web.ts +++ b/src/ReactNativeSVG.web.ts @@ -62,7 +62,7 @@ function prepare(props) { clean.ref = forwardedRef; } - if (props.onPress && !props.onClick){ + if (props.onPress && !props.onClick) { clean.onClick = props.onPress; } diff --git a/src/index.js.flow b/src/index.js.flow index 0c6d973f..84d51279 100644 --- a/src/index.js.flow +++ b/src/index.js.flow @@ -404,6 +404,27 @@ export type MaskProps = { ... } & CommonPathProps; declare export var Mask: React.ComponentClass; +declare export var MarkerUnits: {| + +STROKE_WIDTH: "strokeWidth", // "strokeWidth" + +USER_SPACE_ON_USE: "userSpaceOnUse" // "userSpaceOnUse" +|}; + +declare export var Orient: {| + +AUTO: "auto", // "auto" + +AUTO_START_REVERSE: "auto-start-reverse" // "auto-start-reverse" +|}; +export interface MarkerProps { + id?: string; + viewBox?: string; + preserveAspectRatio?: string; + refX?: NumberProp; + refY?: NumberProp; + markerWidth?: NumberProp; + markerHeight?: NumberProp; + markerUnits?: $Values; + orient?: $Values | NumberProp; +} +declare export var Marker: React.ComponentClass; export type Styles = { [property: string]: string, ...