From ba49ef24b54808d673b943f400eb10c8f5c605fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20LE=20BRAS?= Date: Fri, 28 Feb 2025 11:26:01 +0100 Subject: [PATCH] improve playground output readability in light theme (#970) --- src/Playground.res | 11 +++++------ src/common/EvalIFrame.res | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Playground.res b/src/Playground.res index c506e6c1c..8ea138658 100644 --- a/src/Playground.res +++ b/src/Playground.res @@ -1315,9 +1315,7 @@ module InitialContent = { } ` - let since_10_1 = `@@jsxConfig({ version: 4, mode: "automatic" }) - -module CounterMessage = { + let since_10_1 = `module CounterMessage = { @react.component let make = (~count, ~username=?) => { let times = switch count { @@ -1347,9 +1345,10 @@ module App = { { - evt->ReactEvent.Form.preventDefault - let username = (evt->ReactEvent.Form.target)["value"] + onChange={event => { + event->ReactEvent.Form.preventDefault + let eventTarget = event->ReactEvent.Form.target + let username = eventTarget["value"] setUsername(_prev => username) }} /> diff --git a/src/common/EvalIFrame.res b/src/common/EvalIFrame.res index 5736363c3..507268f66 100644 --- a/src/common/EvalIFrame.res +++ b/src/common/EvalIFrame.res @@ -1,7 +1,7 @@ let css = `body { background-color: inherit; color: CanvasText; - color-scheme: light dark; + color-scheme: dark; }` let reactVersion = "18.2.0"