Skip to content

Commit

Permalink
Merge pull request #215 from illusionalsagacity/fix-missing-props-inp…
Browse files Browse the repository at this point in the history
…utBaseComponentProps

fix: enterKeyHint and inputMode missing from inputBaseComponentProps
  • Loading branch information
fhammerschmidt authored Feb 20, 2025
2 parents 02b21d3 + 0f8fd07 commit ba58b9e
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion packages/rescript-mui-material/src/components/InputBase.res
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,42 @@ type color =
| @as("warning") Warning
| String(string)

/**
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
*/
type enterKeyHint =
| @as("enter") Enter
| @as("done") Done
| @as("go") Go
| @as("next") Next
| @as("previous") Previous
| @as("search") Search
| @as("send") Send

/**
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
*/
type inputMode =
| @as("none") None
| @as("text") Text
| @as("decimal") Decimal
| @as("numeric") Numeric
| @as("tel") Tel
| @as("search") Search
| @as("email") Email
| @as("url") Url

type inputBaseComponentProps = {
...CommonProps.clickableProps,
name?: string,
step?: int,
min?: int,
max?: int,
@as("type") type_?: string,
enterKeyHint?: enterKeyHint,
inputMode?: inputMode,
maxLength?: int,
} // FIXME: there is more
} // FIXME: #213 there are more

type margin =
| @as("dense") Dense
Expand Down

0 comments on commit ba58b9e

Please sign in to comment.