Skip to content

Commit 2e702f6

Browse files
Merge pull request #230 from illusionalsagacity/common-props
More CommonProps
2 parents 3a1748b + 1d7d9bc commit 2e702f6

File tree

4 files changed

+54
-11
lines changed

4 files changed

+54
-11
lines changed

packages/rescript-mui-material/src/components/ButtonBase.res

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ type publicProps = {
124124
* The rel attribute for the link.
125125
*/
126126
rel?: string,
127-
/**
128-
* @default 0
129-
*/
130-
tabIndex?: int,
131127
/**
132128
* The target attribute of the link.
133129
*/

packages/rescript-mui-material/src/components/CardHeader.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type classes = {
1414
}
1515

1616
type props = {
17-
...CommonProps.t,
17+
...CommonProps.t_NoTitle,
1818
/**
1919
* The action to display in the card header.
2020
*/

packages/rescript-mui-material/src/components/Slider.res

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ type sliderProps<'value> = {
252252
* The system prop that allows defining system overrides as well as additional CSS styles.
253253
*/
254254
sx?: Sx.props,
255-
/**
256-
* Tab index attribute of the hidden `input` element.
257-
*/
258-
tabIndex?: int,
259255
/**
260256
* The track presentation:
261257
*

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

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ type t_NoId = {
107107
style?: ReactDOM.Style.t,
108108
ref?: ReactDOM.domRef,
109109
@as("data-testid") dataTestId?: string,
110+
/**
111+
* @default 0
112+
*/
113+
tabIndex?: int,
110114
}
111115

112116
type classNameOnly = {className: string}
@@ -117,27 +121,74 @@ type t_NoRef = {
117121
id?: string,
118122
}
119123

124+
type t_NoTitle = {
125+
...t_NoId,
126+
id?: string,
127+
}
128+
120129
type t = {
121130
...t_NoId,
122131
id?: string,
132+
title?: string,
123133
}
124134

125135
type clickableProps = {
126136
...t,
137+
// Focus Events
127138
onBlur?: ReactEvent.Focus.t => unit,
128-
onContextMenu?: ReactEvent.Mouse.t => unit,
129-
onDragLeave?: ReactEvent.Mouse.t => unit,
130139
onFocus?: ReactEvent.Focus.t => unit,
140+
141+
// Keyboard Events
131142
onKeyDown?: ReactEvent.Keyboard.t => unit,
132143
onKeyPress?: ReactEvent.Keyboard.t => unit,
133144
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,
134156
onMouseDown?: ReactEvent.Mouse.t => unit,
135157
onMouseEnter?: ReactEvent.Mouse.t => unit,
136158
onMouseLeave?: ReactEvent.Mouse.t => unit,
137159
onMouseUp?: ReactEvent.Mouse.t => unit,
160+
161+
// Touch Events
162+
onTouchCancel?: ReactEvent.Touch.t => unit,
163+
onTouchCancelCapture?: ReactEvent.Touch.t => unit,
138164
onTouchEnd?: ReactEvent.Touch.t => unit,
165+
onTouchEndCapture?: ReactEvent.Touch.t => unit,
139166
onTouchMove?: ReactEvent.Touch.t => unit,
167+
onTouchMoveCapture?: ReactEvent.Touch.t => unit,
140168
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,
141192
}
142193

143194
type clickablePropsWithOnClick = {

0 commit comments

Comments
 (0)