Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
0e0333be
Commit
0e0333be
authored
Aug 14, 2023
by
Fabien Manière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding a dynamic class name to node arrows
parent
d180ce86
Pipeline
#4507
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
16 deletions
+46
-16
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+46
-16
No files found.
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
0e0333be
...
@@ -16,6 +16,7 @@ import Effect (Effect)
...
@@ -16,6 +16,7 @@ import Effect (Effect)
import Effect.Aff (Aff, launchAff)
import Effect.Aff (Aff, launchAff)
import Effect.Class (liftEffect)
import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.App.Store (Boxes)
import Gargantext.Components.App.Store (Boxes)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), Elevation(..), TooltipEffect(..), Variant(..))
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), Elevation(..), TooltipEffect(..), Variant(..))
...
@@ -35,7 +36,7 @@ import Gargantext.Hooks.Loader (useLoaderEffect)
...
@@ -35,7 +36,7 @@ import Gargantext.Hooks.Loader (useLoaderEffect)
import Gargantext.Hooks.Version (Version, useVersion)
import Gargantext.Hooks.Version (Version, useVersion)
import Gargantext.Routes as Routes
import Gargantext.Routes as Routes
import Gargantext.Sessions (Session, sessionId)
import Gargantext.Sessions (Session, sessionId)
import Gargantext.Types (ID, Name)
import Gargantext.Types (
Handed(..),
ID, Name)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils (nbsp, textEllipsisBreak, (?))
import Gargantext.Utils (nbsp, textEllipsisBreak, (?))
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
...
@@ -423,24 +424,53 @@ folderIcon :: R2.Leaf FolderIconProps
...
@@ -423,24 +424,53 @@ folderIcon :: R2.Leaf FolderIconProps
folderIcon = R2.leaf folderIconCpt
folderIcon = R2.leaf folderIconCpt
folderIconCpt :: R.Component FolderIconProps
folderIconCpt :: R.Component FolderIconProps
folderIconCpt = here.component "folderIcon" cpt where
folderIconCpt = here.component "folderIcon" cpt where
cpt { isLeaf: true } _ = pure $
cpt { isLeaf: true } _ = do
-- | States
-- |
{ handed
} <- AppStore.use
handed' <- R2.useLive' handed
-- | Computed
-- |
let
handedClassName :: Handed -> String
handedClassName = case _ of
LeftHanded -> "angle-left"
RightHanded -> "angle-right"
pure $
B.icon
B.icon
{ className: intercalate " "
{ className: intercalate " "
["mainleaf__folder-icon"
["mainleaf__folder-icon"
, "mainleaf__folder-icon--leaf"
, "mainleaf__folder-icon--leaf"
]
]
, name: "angle-right"
, name: handedClassName handed'
}
}
cpt { callback, isOpened } _ = pure $
cpt { callback, isOpened } _ = do
-- | States
-- |
{ handed
} <- AppStore.use
handed' <- R2.useLive' handed
-- | Computed
-- |
let
handedClassName :: Handed -> String
handedClassName = case _ of
LeftHanded -> "angle-left"
RightHanded -> "angle-right"
B.iconButton
{ className: "mainleaf__folder-icon"
pure $
, name: isOpened ? "angle-down" $ "angle-right"
, overlay: false
B.iconButton
, callback
{ className: "mainleaf__folder-icon"
}
, name: isOpened ? "angle-down" $ handedClassName handed'
, overlay: false
, callback
}
-----------------------------------------------
-----------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment