mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-30 13:38:30 +00:00
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:
@@ -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
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user