add missing onLayout prop typings (#1815)

onLayout prop typings are missing. This PR simply adds missing onLayout prop to svg nodes.

Co-authored-by: Sergey Tshovrebov <sinxwal@gmail.com>
This commit is contained in:
Wojciech Lewicki
2022-07-26 16:03:38 +02:00
committed by GitHub
parent 9c1a8b1f71
commit af68c93d04
3 changed files with 15 additions and 3 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import { withoutXY } from '../lib/extract/extractProps';
import {
ClipProps,
CommonMaskProps,
NativeProps,
NumberProp,
ResponderProps,
TouchableProps,
@@ -18,7 +19,8 @@ export interface ImageProps
extends ResponderProps,
CommonMaskProps,
ClipProps,
TouchableProps {
TouchableProps,
NativeProps {
x?: NumberProp;
y?: NumberProp;
width?: NumberProp;
+6 -1
View File
@@ -9,6 +9,7 @@ import * as ReactNative from "react-native";
import {
ColorValue,
GestureResponderEvent,
LayoutChangeEvent,
TransformsStyle,
} from "react-native";
export type NumberProp = string | number;
@@ -191,6 +192,9 @@ export interface CommonMarkerProps {
markerMid?: string;
markerEnd?: string;
}
export interface NativeProps {
onLayout?: (event: LayoutChangeEvent) => void;
}
export type CommonPathProps = { ... } & FillProps &
StrokeProps &
ClipProps &
@@ -200,7 +204,8 @@ export type CommonPathProps = { ... } & FillProps &
TouchableProps &
DefinitionProps &
CommonMarkerProps &
CommonMaskProps;
CommonMaskProps &
NativeProps;
export type CircleProps = {
cx?: NumberProp,
cy?: NumberProp,
+6 -1
View File
@@ -232,6 +232,10 @@ export interface CommonMarkerProps {
markerEnd?: string;
}
export interface NativeProps {
onLayout?: (event: LayoutChangeEvent) => void;
}
export interface CommonPathProps
extends FillProps,
StrokeProps,
@@ -242,7 +246,8 @@ export interface CommonPathProps
TouchableProps,
DefinitionProps,
CommonMarkerProps,
CommonMaskProps {}
CommonMaskProps,
NativeProps {}
export type ResponderInstanceProps = {
touchableHandleResponderMove?: (e: GestureResponderEvent) => void;