Minor cleanup

This commit is contained in:
Ozzie Gooen 2020-02-13 22:04:13 +00:00
parent b06ac56efd
commit 2b0e00ea3b
4 changed files with 15 additions and 8 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Foretold.io</title>
<title>Estiband</title>
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<link href="./styles/index.css" rel="stylesheet">
<script src="./Index.re" defer></script>

View File

@ -30,6 +30,9 @@ module Value = {
| Probability(r) => (r *. 100. |> Js.Float.toFixed) ++ "%"
| DateTime(r) => r |> MomentRe.Moment.defaultFormat
| FloatPoint(r) => r |> Js.Float.toFixed
| Conditional(r) => r.name
| ConditionalArray(r) =>
r |> E.A.fmap(r => r.name) |> Js.Array.joinWith(",")
};
};

View File

@ -59,7 +59,7 @@ let make =
className="max-w-sm rounded overflow-hidden shadow-sm py-1 px-2 rounded mb-3 bg-gray-200">
{r |> ReasonReact.string}
<button
className="bg-blue-500 hover:bg-blue-700 text-white py-1 px-2 rounded"
className="bg-blue-500 hover:bg-blue-700 text-white py-0 px-1 rounded"
onClick={e => {
ReactEvent.Synthetic.preventDefault(e);
onChange(
@ -77,10 +77,10 @@ let make =
);
();
}}>
{"true" |> ReasonReact.string}
{"True" |> ReasonReact.string}
</button>
<button
className="hover:bg-red-700 text-white py-1 px-2 rounded bg-red-500"
className="hover:bg-red-700 text-white py-0 px-1 rounded bg-red-500"
onClick={e => {
ReactEvent.Synthetic.preventDefault(e);
onChange(
@ -97,7 +97,7 @@ let make =
),
);
}}>
{"false" |> ReasonReact.string}
{"False" |> ReasonReact.string}
</button>
</div>
)

View File

@ -152,6 +152,7 @@ module Interface = {
Some(DateTime(intendedYear)),
Some(DateTime(currentYear)),
Some(SelectSingle(output)),
_,
|] =>
choiceFromString(fund)
|> E.O.fmap(fund =>
@ -230,11 +231,14 @@ module Interface = {
(),
),
TypeWithMetadata.make(
~name="Conditional on World Ending",
~id="worldEnd",
~name="Conditionals",
~id="conditionals",
~type_=
Conditionals(
Prop.Type.makeConditionals([||], [|"Foo", "Bar", "Char"|]),
Prop.Type.makeConditionals(
[||],
[|"Global Existential Event"|],
),
),
(),
),