Skip to content

Commit 1d7d9bc

Browse files
feat: adds more event handlers to CommonProps.clickableProps
1 parent f3b1888 commit 1d7d9bc

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

packages/rescript-mui-material/src/types/CommonProps.res

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,61 @@ type t = {
134134

135135
type clickableProps = {
136136
...t,
137+
// Focus Events
137138
onBlur?: ReactEvent.Focus.t => unit,
138-
onContextMenu?: ReactEvent.Mouse.t => unit,
139-
onDragLeave?: ReactEvent.Mouse.t => unit,
140139
onFocus?: ReactEvent.Focus.t => unit,
140+
141+
// Keyboard Events
141142
onKeyDown?: ReactEvent.Keyboard.t => unit,
142143
onKeyPress?: ReactEvent.Keyboard.t => unit,
143144
onKeyUp?: ReactEvent.Keyboard.t => unit,
145+
146+
// Mouse Events
147+
onContextMenu?: ReactEvent.Mouse.t => unit,
148+
onDrag?: ReactEvent.Mouse.t => unit,
149+
onDragEnd?: ReactEvent.Mouse.t => unit,
150+
onDragEnter?: ReactEvent.Mouse.t => unit,
151+
onDragExit?: ReactEvent.Mouse.t => unit,
152+
onDragLeave?: ReactEvent.Mouse.t => unit,
153+
onDragOver?: ReactEvent.Mouse.t => unit,
154+
onDragStart?: ReactEvent.Mouse.t => unit,
155+
onDrop?: ReactEvent.Mouse.t => unit,
144156
onMouseDown?: ReactEvent.Mouse.t => unit,
145157
onMouseEnter?: ReactEvent.Mouse.t => unit,
146158
onMouseLeave?: ReactEvent.Mouse.t => unit,
147159
onMouseUp?: ReactEvent.Mouse.t => unit,
160+
161+
// Touch Events
162+
onTouchCancel?: ReactEvent.Touch.t => unit,
163+
onTouchCancelCapture?: ReactEvent.Touch.t => unit,
148164
onTouchEnd?: ReactEvent.Touch.t => unit,
165+
onTouchEndCapture?: ReactEvent.Touch.t => unit,
149166
onTouchMove?: ReactEvent.Touch.t => unit,
167+
onTouchMoveCapture?: ReactEvent.Touch.t => unit,
150168
onTouchStart?: ReactEvent.Touch.t => unit,
169+
onTouchStartCapture?: ReactEvent.Touch.t => unit,
170+
171+
// Pointer Events
172+
onGotPointerCapture?: ReactEvent.Pointer.t => unit,
173+
onGotPointerCaptureCapture?: ReactEvent.Pointer.t => unit,
174+
onLostPointerCapture?: ReactEvent.Pointer.t => unit,
175+
onLostPointerCaptureCapture?: ReactEvent.Pointer.t => unit,
176+
onPointerCancel?: ReactEvent.Pointer.t => unit,
177+
onPointerCancelCapture?: ReactEvent.Pointer.t => unit,
178+
onPointerDown?: ReactEvent.Pointer.t => unit,
179+
onPointerDownCapture?: ReactEvent.Pointer.t => unit,
180+
onPointerEnter?: ReactEvent.Pointer.t => unit,
181+
onPointerEnterCapture?: ReactEvent.Pointer.t => unit,
182+
onPointerLeave?: ReactEvent.Pointer.t => unit,
183+
onPointerLeaveCapture?: ReactEvent.Pointer.t => unit,
184+
onPointerMove?: ReactEvent.Pointer.t => unit,
185+
onPointerMoveCapture?: ReactEvent.Pointer.t => unit,
186+
onPointerOut?: ReactEvent.Pointer.t => unit,
187+
onPointerOutCapture?: ReactEvent.Pointer.t => unit,
188+
onPointerOver?: ReactEvent.Pointer.t => unit,
189+
onPointerOverCapture?: ReactEvent.Pointer.t => unit,
190+
onPointerUp?: ReactEvent.Pointer.t => unit,
191+
onPointerUpCapture?: ReactEvent.Pointer.t => unit,
151192
}
152193

153194
type clickablePropsWithOnClick = {

0 commit comments

Comments
 (0)