Commit 6dc93d93 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DESIGN] increasing box if not many actions

parent ab4c05a4
......@@ -72,7 +72,7 @@ addNodeView p@{ dispatch, nodeType, nodeTypes } = R.createElement el p []
-> R.Element
panelBody (_ /\ setNodeName) (nt /\ setNodeType) =
H.div {className: "panel-body"}
[ H.div {className: "row"}
[ H.div {className: "row", style: {"margin":"10px"}}
[ H.div {className: "col-md-10"}
[ H.form {className: "form-horizontal"} $ maybeChoose <> maybeEdit ]
]
......
module Gargantext.Components.Forest.Tree.Node.Box where
import Data.Array (length)
import Data.Maybe (Maybe(..))
import Data.Nullable (null)
import Data.String as S
......@@ -22,7 +23,7 @@ import Gargantext.Components.Forest.Tree.Node.Action.Upload (actionUpload)
import Gargantext.Components.Forest.Tree.Node.Box.Types (NodePopupProps, NodePopupS)
import Gargantext.Components.Forest.Tree.Node.Settings (NodeAction(..), SettingsBox(..), glyphiconNodeAction, settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools (textInputBox, fragmentPT)
import Gargantext.Prelude (Unit, bind, const, map, pure, show, ($), (<>), (==))
import Gargantext.Prelude (Unit, bind, const, map, pure, show, ($), (<>), (==), (<))
import Gargantext.Sessions (Session)
import Gargantext.Types (Name, ID)
import Gargantext.Types as GT
......@@ -138,7 +139,7 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
-> R.Element
panelBody nodePopupState {dispatch: d, nodeType} =
H.div {className: "panel-body flex-space-between"}
[ H.p { "style": {"margin":"10px"}} []
$ [ H.p { "style": {"margin":"10px"}} []
, H.div { className: "flex-center"}
[ buttonClick { action: doc
, state: nodePopupState
......@@ -150,6 +151,10 @@ nodePopupCpt = R.hooksComponent "G.C.F.T.N.B.nodePopupView" cpt
}
) buttons
]
-- FIXME trick to increase the size of the box
<> if length buttons < 2
then [H.div {className: "col-md-4"} []]
else []
where
SettingsBox {edit, doc, buttons} = settingsBox nodeType
......
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