LoadingSpinner.purs 825 Bytes
Newer Older
James Laver's avatar
James Laver committed
1 2 3 4 5
module Gargantext.Components.LoadingSpinner where

import Reactix as R
import Reactix.DOM.HTML as H

6 7 8 9 10 11
import Gargantext.Prelude

import Gargantext.Utils.Reactix as R2

here :: R2.Here
here = R2.here "Gargantext.Components.LoadingSpinner"
12

James Laver's avatar
James Laver committed
13 14 15 16 17 18
type Props = ()

loadingSpinner :: Record Props -> R.Element
loadingSpinner props = R.createElement loadingSpinnerCpt props []

loadingSpinnerCpt :: R.Component Props
19
loadingSpinnerCpt = here.component "LoadingSpinner" cpt
James Laver's avatar
James Laver committed
20
  where
21
    -- cpt _ _ = H.i {className: "spinner fa fa-smile-o fa-spin fa-3x fa-fw"} [H.text ""]
22 23 24
    -- cpt _ _ = H.i {className: "fa fa-globe fa-spin fa-3x fa-fw"} [H.text ""]

    -- cpt _ _ = H.i {className: "fa fa-circle-o-notch fa-spin fa-3x fa-fw"} [H.text ""]
25 26
    cpt _ _ = do
      pure $ H.i {className: "fa fa-spinner fa-pulse fa-3x fa-fw"} [H.text ""]