diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a66209..19415eb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,13 +14,17 @@ title: Changelog (_Tags are copied from [babel](https://github.com/babel/babel/blob/master/CHANGELOG.md)_) +## master + +- :bug: Fix Input element type. + ## 5.0.0-alpha.1 - :boom: Complete rewrite to adapt to MUI v5 (in progress). - :boom: Release rescript-mui packages under a new npm organization (`@rescript-mui`). - :memo: Rename the repository to rescript-mui. - :memo: Deprecate website. -- :house: - Restructure repo to a ReScript-Monorepo with pinned-packages. +- :house: Restructure repo to a ReScript-Monorepo with pinned-packages. ## 3.0.2 diff --git a/examples/src/examples/ExampleSelect.bs.js b/examples/src/examples/ExampleSelect.bs.js index 1851f44d..cb37fcf5 100644 --- a/examples/src/examples/ExampleSelect.bs.js +++ b/examples/src/examples/ExampleSelect.bs.js @@ -121,9 +121,7 @@ function ExampleSelect(props) { value: "30" }) ], - input: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + input: Caml_option.some(JsxRuntime.jsx(Input, { id: "age-helper", name: "age" })), @@ -198,9 +196,7 @@ function ExampleSelect(props) { }) ], displayEmpty: true, - input: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + input: Caml_option.some(JsxRuntime.jsx(Input, { id: "age-label-placeholder", name: "age" })), @@ -239,9 +235,7 @@ function ExampleSelect(props) { value: "kevin" }) ], - input: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + input: Caml_option.some(JsxRuntime.jsx(Input, { id: "name-disabled", name: "name" })), @@ -282,9 +276,7 @@ function ExampleSelect(props) { value: "kevin" }) ], - input: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + input: Caml_option.some(JsxRuntime.jsx(Input, { id: "name-error" })), onChange: handleChangeName, @@ -326,9 +318,7 @@ function ExampleSelect(props) { value: "kevin" }) ], - input: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + input: Caml_option.some(JsxRuntime.jsx(Input, { id: "name-readonly", name: "name", readOnly: true @@ -369,9 +359,7 @@ function ExampleSelect(props) { value: "30" }) ], - input: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + input: Caml_option.some(JsxRuntime.jsx(Input, { id: "age-auto-width", name: "age" })), diff --git a/examples/src/examples/ExampleSlider.bs.js b/examples/src/examples/ExampleSlider.bs.js index 1645525b..70ab540b 100644 --- a/examples/src/examples/ExampleSlider.bs.js +++ b/examples/src/examples/ExampleSlider.bs.js @@ -43,9 +43,7 @@ function ExampleSlider(props) { xs: true }), JsxRuntime.jsx(Grid, { - children: Caml_option.some(JsxRuntime.jsx((function (prim) { - return Input(prim); - }), { + children: Caml_option.some(JsxRuntime.jsx(Input, { inputProps: { step: 10, min: 0, diff --git a/packages/rescript-mui-material/src/components/Input.res b/packages/rescript-mui-material/src/components/Input.res index f0d8637a..4dc6d8c6 100644 --- a/packages/rescript-mui-material/src/components/Input.res +++ b/packages/rescript-mui-material/src/components/Input.res @@ -69,4 +69,4 @@ type props<'value> = { } @module("@mui/material/Input") -external make: props<'value> => React.element = "default" +external make: React.component> = "default"