summaryrefslogtreecommitdiff
path: root/bs5/universal/native/shared/ServerActionWithError.re
blob: 94e8e672a15070444da2365278c0e7c26ea0e074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>;
};