Skip to content

Add touch event props #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions src/ReactNativeSvg.res
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ module Svg = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Svg"
}

Expand Down Expand Up @@ -141,6 +150,15 @@ module Rect = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Rect"
}

Expand Down Expand Up @@ -183,6 +201,15 @@ module Circle = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Circle"
}

Expand Down Expand Up @@ -226,6 +253,15 @@ module Ellipse = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Ellipse"
}

Expand Down Expand Up @@ -269,6 +305,15 @@ module Line = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Line"
}

Expand Down Expand Up @@ -309,6 +354,15 @@ module Polygon = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Polygon"
}

Expand Down Expand Up @@ -349,6 +403,15 @@ module Polyline = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Polyline"
}

Expand Down Expand Up @@ -389,6 +452,15 @@ module Path = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Path"
}

Expand Down Expand Up @@ -508,6 +580,15 @@ module Text = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Text"
}

Expand Down Expand Up @@ -628,6 +709,15 @@ module TextPath = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "TextPath"
}

Expand Down Expand Up @@ -720,6 +810,15 @@ module Tspan = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "TSpan"
}

Expand Down Expand Up @@ -763,6 +862,15 @@ module Use = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Use"
}

Expand Down Expand Up @@ -802,6 +910,15 @@ module G = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "G"
}

Expand Down Expand Up @@ -861,6 +978,15 @@ module Image = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Image"
}

Expand Down Expand Up @@ -950,6 +1076,15 @@ module Mask = {
~origin: string=?,
~originX: size=?,
~originY: size=?,
// Responder Props
~onPress: Event.pressEvent => unit=?,
~onPressIn: Event.pressEvent => unit=?,
~onPressOut: Event.pressEvent => unit=?,
~onLongPress: Event.pressEvent => unit=?,
~disabled: bool=?,
~delayPressIn: int=?,
~delayPressOut: int=?,
~delayLongPress: int=?,
) => React.element = "Mask"
}

Expand Down