Skip to content

Commit

Permalink
melange v3: fixes for latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Jan 18, 2024
1 parent e90550f commit c3495c3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion example/Demo.re
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ demo(({addDemo: _, addCategory}) =>
style={ReactDOM.Style.make(
~fontSize=
{let size =
int("Font size", {min: 0, max: 100, initial: 30, step: 1});
int("Font size", {min: 0, max: 100, initial: 30, step: 1})->string_of_int;
{j|$(size)px|j}},
(),
)}>
Expand Down
6 changes: 3 additions & 3 deletions reshowcase.opam
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ depexts: [
["webpack-dev-server"] {npm-version = "^4.11.1"}
]
pin-depends: [
["melange.dev" "git+https://github.com/melange-re/melange#982cba971fa662439f0675465ef854424771ca3d"]
["reason-react.dev" "https://github.com/reasonml/reason-react/archive/f799ac03d79d39de04fe937075607c348f8053b4.tar.gz"]
["reason-react-ppx.dev" "https://github.com/reasonml/reason-react/archive/f799ac03d79d39de04fe937075607c348f8053b4.tar.gz"]
["melange.dev" "git+https://github.com/melange-re/melange#d2715c469e8cf8bf8cff81b897c212094a9517c5"]
["reason-react.dev" "https://github.com/reasonml/reason-react/archive/1f084f4ecf380b2144809065e5935a41866eab3f.tar.gz"]
["reason-react-ppx.dev" "https://github.com/reasonml/reason-react/archive/1f084f4ecf380b2144809065e5935a41866eab3f.tar.gz"]
]
6 changes: 3 additions & 3 deletions reshowcase.opam.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ depexts: [
["webpack-dev-server"] {npm-version = "^4.11.1"}
]
pin-depends: [
["melange.dev" "git+https://github.com/melange-re/melange#982cba971fa662439f0675465ef854424771ca3d"]
["reason-react.dev" "https://github.com/reasonml/reason-react/archive/f799ac03d79d39de04fe937075607c348f8053b4.tar.gz"]
["reason-react-ppx.dev" "https://github.com/reasonml/reason-react/archive/f799ac03d79d39de04fe937075607c348f8053b4.tar.gz"]
["melange.dev" "git+https://github.com/melange-re/melange#d2715c469e8cf8bf8cff81b897c212094a9517c5"]
["reason-react.dev" "https://github.com/reasonml/reason-react/archive/1f084f4ecf380b2144809065e5935a41866eab3f.tar.gz"]
["reason-react-ppx.dev" "https://github.com/reasonml/reason-react/archive/1f084f4ecf380b2144809065e5935a41866eab3f.tar.gz"]
]
25 changes: 12 additions & 13 deletions src/ReshowcaseUi.re
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module Collapsible = Layout.Collapsible;
module URLSearchParams = Bindings.URLSearchParams;
module Window = Bindings.Window;
module LocalStorage = Bindings.LocalStorage;
module Array = Js.Array;

type responsiveMode =
| Mobile
Expand Down Expand Up @@ -300,7 +299,7 @@ module DemoListSidebar = {
let demos = demos->Js.Dict.entries;
demos
->(
Array.map(~f=((entityName, entity)) => {
Array.map(((entityName, entity)) => {
let searchMatchingTerms =
HighlightTerms.getMatchingTerms(~searchString, ~entityName);

Expand Down Expand Up @@ -564,7 +563,7 @@ module DemoUnitSidebar = {
{strings
->Map.String.toArray
->(
Array.map(~f=((propName, (_config, value, options))) =>
Array.map(((propName, (_config, value, options))) =>
<PropBox key=propName propName>
{switch (options) {
| None =>
Expand All @@ -589,7 +588,7 @@ module DemoUnitSidebar = {
}}>
{options
->(
Array.map(~f=((key, optionValue)) =>
Array.map(((key, optionValue)) =>
<option
key
selected={value == optionValue}
Expand All @@ -608,13 +607,13 @@ module DemoUnitSidebar = {
{ints
->Map.String.toArray
->(
Array.map(~f=((propName, ({Configs.min, max, _}, value))) =>
Array.map(((propName, ({Configs.min, max, _}, value))) =>
<PropBox key=propName propName>
<input
type_="number"
min={j|$min|j}
max={j|$max|j}
value={j|$value|j}
min=string_of_int(min)
max=string_of_int(max)
value=string_of_int(value)
style=Styles.textInput
onChange={event =>
onIntChange(
Expand All @@ -630,13 +629,13 @@ module DemoUnitSidebar = {
{floats
->Map.String.toArray
->(
Array.map(~f=((propName, ({Configs.min, max, _}, value))) =>
Array.map(((propName, ({Configs.min, max, _}, value))) =>
<PropBox key=propName propName>
<input
type_="number"
min={j|$min|j}
max={j|$max|j}
value={j|$value|j}
min=string_of_float(min)
max=string_of_float(max)
value=string_of_float(value)
style=Styles.textInput
onChange={event =>
onFloatChange(
Expand All @@ -652,7 +651,7 @@ module DemoUnitSidebar = {
{bools
->Map.String.toArray
->(
Array.map(~f=((propName, (_config, checked))) =>
Array.map(((propName, (_config, checked))) =>
<PropBox key=propName propName>
<input
type_="checkbox"
Expand Down

0 comments on commit c3495c3

Please sign in to comment.