Commit 1b3caa7a authored by James Laver's avatar James Laver Committed by Alexandre Delanoë

Add background term styling to G.C.Annotated.AnnotatedField

parent 46388a63
......@@ -24,10 +24,11 @@ import Effect.Class.Console (log)
import Effect.Unsafe (unsafePerformEffect)
import React (ReactElement, ReactClass, createElement)
import React.DOM (p, span, text)
import React.DOM.Props (className, onContextMenu)
import React.DOM.Props as Props
import React.DOM.Props (className, onContextMenu, style)
import Thermite (PerformAction, Render, createReactSpec, simpleSpec, writeState)
import Gargantext.Types (TermList)
import Gargantext.Components.NgramsTable (NgramsTable(..), highlightNgrams, termStyle)
import Gargantext.Types (TermList(..))
import Gargantext.Components.NgramsTable (NgramsTable(..), highlightNgrams)
import Gargantext.Utils.React (WithChildren)
import Gargantext.Utils.Selection (getSelection, toString)
import React as React
......@@ -122,6 +123,11 @@ contextMenuHandler d e =
y <- pageY e
pure $ PageOffset { x, y }
termStyle :: TermList -> Props.Props
termStyle GraphTerm = style {backgroundColor: "green"}
termStyle StopTerm = style {backgroundColor: "red", textDecoration : "line-through"}
termStyle CandidateTerm = style {backgroundColor: "black"}
_runs :: Lens' State (List Run)
_runs = lens (\a -> a.runs) (\a r -> a { runs = r })
......
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