Skip to content

Commit cb99494

Browse files
fix: enterKeyHint and inputMode missing from inputBaseComponentProps
1 parent ac29f29 commit cb99494

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

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

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,31 @@ type color =
5151
| @as("warning") Warning
5252
| String(string)
5353

54+
/**
55+
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
56+
*/
57+
type enterKeyHint =
58+
| @as("enter") Enter
59+
| @as("done") Done
60+
| @as("go") Go
61+
| @as("next") Next
62+
| @as("previous") Previous
63+
| @as("search") Search
64+
| @as("send") Send
65+
66+
/**
67+
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
68+
*/
69+
type inputMode =
70+
| @as("none") None
71+
| @as("text") Text
72+
| @as("decimal") Decimal
73+
| @as("numeric") Numeric
74+
| @as("tel") Tel
75+
| @as("search") Search
76+
| @as("email") Email
77+
| @as("url") Url
78+
5479
type inputBaseComponentProps = {
5580
...CommonProps.clickableProps,
5681
name?: string,
@@ -59,8 +84,10 @@ type inputBaseComponentProps = {
5984
max?: int,
6085
@as("type") type_?: string,
6186
@as("disableunderline") disableUnderline?: string,
87+
enterKeyHint?: enterKeyHint,
88+
inputMode?: inputMode,
6289
maxLength?: int,
63-
} // FIXME: there is more
90+
} // FIXME: #213 there are more
6491

6592
type margin =
6693
| @as("dense") Dense

0 commit comments

Comments
 (0)