summaryrefslogtreecommitdiff
path: root/bs5/universal/native/shared/DemoLayout.re
blob: 376162f84487bd9192bcaa9d09b087195eeb5e94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
type mode =
  | FullScreen
  | Fit800px;

[@react.component]
let make = (~children, ~background=Theme.Color.Gray2, ~mode=Fit800px) => {
  <div
    className={Cx.make([
      "m-0",
      "p-8",
      "min-w-[100vw]",
      "min-h-[100vh]",
      switch (mode) {
      | FullScreen => "h-100vh w-100vw"
      | Fit800px => "h-full w-[800px]"
      },
      "flex",
      "flex-col",
      "items-center",
      "justify-start",
      Theme.background(background),
    ])}>
    <nav className="w-full mt-10">
      <a
        className={Cx.make([
          "text-s font-bold inline-flex items-center justify-between gap-2",
          Theme.text(Theme.Color.Gray12),
          Theme.hover([Theme.text(Theme.Color.Gray10)]),
        ])}
        href=Router.home>
        <Arrow direction=Left />
        {React.string("Home")}
      </a>
    </nav>
    <div spellCheck=false className="w-full pt-6 max-w-[1200px]">
      children
    </div>
  </div>;
};