summaryrefslogtreecommitdiff
path: root/bs5/universal/native/shared/ServerActionWithError.re
diff options
context:
space:
mode:
Diffstat (limited to 'bs5/universal/native/shared/ServerActionWithError.re')
-rw-r--r--bs5/universal/native/shared/ServerActionWithError.re14
1 files changed, 14 insertions, 0 deletions
diff --git a/bs5/universal/native/shared/ServerActionWithError.re b/bs5/universal/native/shared/ServerActionWithError.re
new file mode 100644
index 0000000..94e8e67
--- /dev/null
+++ b/bs5/universal/native/shared/ServerActionWithError.re
@@ -0,0 +1,14 @@
+[@react.client.component]
+let make = () => {
+ <div className={Cx.make([Theme.text(Theme.Color.Gray4)])}>
+ <button
+ className="cursor-pointer font-mono border-2 py-1 px-2 rounded-lg bg-yellow-950 border-yellow-700 text-yellow-200 hover:bg-yellow-800"
+ onClick=[%browser_only
+ _ => {
+ ServerFunctions.error.call() |> ignore;
+ }
+ ]>
+ {React.string("Click to trigger error, see it on the console")}
+ </button>
+ </div>;
+};