SimpleLayout.purs 832 Bytes
Newer Older
1 2 3 4
module Gargantext.Components.SimpleLayout where

import Reactix as R
import Reactix.DOM.HTML as H
5
import Toestand as T
6 7 8 9 10 11 12 13

import Gargantext.Prelude

import Gargantext.Components.TopBar (topBar)
import Gargantext.License (license)
import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2

14 15
here :: R2.Here
here = R2.here "Gargantext.Components.SimpleLayout"
16 17 18

-- Simple layout does not accommodate the tree
type SimpleLayoutProps = (
19
  handed :: T.Box GT.Handed
20 21 22 23 24 25
  )

simpleLayout :: R2.Component SimpleLayoutProps
simpleLayout = R.createElement simpleLayoutCpt

simpleLayoutCpt :: R.Component SimpleLayoutProps
26
simpleLayoutCpt = here.component "simpleLayout" cpt
27 28 29
  where
    cpt { handed } children = do
      pure $ H.div { className: "simple-layout" } (
30
        [ topBar { handed } [] ] <> children <> [ license ]
31
        )