Commit f3ddb355 authored by Karen Konou's avatar Karen Konou

[Tree search] styling

parent 62ea7d7d
...@@ -10,7 +10,7 @@ import Data.String (Pattern(..), contains, toLower) ...@@ -10,7 +10,7 @@ import Data.String (Pattern(..), contains, toLower)
import Effect (Effect) import Effect (Effect)
import Gargantext.Components.Bootstrap (formSelect') import Gargantext.Components.Bootstrap (formSelect')
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ModalSizing(..)) import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), ModalSizing(..), Position(..), TooltipPosition(..), Variant(..))
import Gargantext.Config.REST (AffRESTError, logRESTError) import Gargantext.Config.REST (AffRESTError, logRESTError)
import Gargantext.Hooks.LinkHandler (useLinkHandler) import Gargantext.Hooks.LinkHandler (useLinkHandler)
import Gargantext.Hooks.Loader (useLoader) import Gargantext.Hooks.Loader (useLoader)
...@@ -70,7 +70,7 @@ treeSearchCpt = here.component "treeSearch" cpt where ...@@ -70,7 +70,7 @@ treeSearchCpt = here.component "treeSearch" cpt where
B.baseModal B.baseModal
{ isVisibleBox: visible { isVisibleBox: visible
, title: Just "Tree Search" , title: Just "Tree Search"
, size: ExtraLargeModalSize , size: MediumModalSize
, modalClassName: "" , modalClassName: ""
} }
[ treeSearchState {visible, sessions: sessions'} ] [ treeSearchState {visible, sessions: sessions'} ]
...@@ -153,11 +153,27 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where ...@@ -153,11 +153,27 @@ treeSearchRenderCpt = here.component "treeSearchRenderCpt" cpt where
where where
results s = map searchResult s results s = map searchResult s
where where
searchResult sd = H.div {} [H.button { className: "mainleaf" searchResult sd = H.div
, on: { click: do { className: "forest-layout__action"}
T.write_ false visible [
goToRoute $ fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id}} B.tooltipContainer
[B.icon {name: getIcon sd.type true} , H.text sd.name]] { delayShow: 600
, position: TooltipPosition Right
, tooltipSlot: B.span_ $ show $ fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id
, defaultSlot:
B.button
{ className: "forest-layout__action__button"
, callback: \_ -> do
T.write_ false visible
goToRoute $ fromMaybe Home $ nodeTypeAppRoute sd.type (sessionId session) sd.id
, variant: ButtonVariant Light }
[
B.icon {name: getIcon sd.type true}
, B.wad_ [ "d-inline-block", "w-1" ]
, H.text sd.name
]
}
]
change _ = T.write_ (filter (\val -> contains (Pattern $ toLower $ R2.getInputValue inputRef) (toLower val.name)) searchData) filteredData change _ = T.write_ (filter (\val -> contains (Pattern $ toLower $ R2.getInputValue inputRef) (toLower val.name)) searchData) filteredData
type LoadProps = ( session :: Session ) type LoadProps = ( session :: Session )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment