github.com/simpleiot/simpleiot@v0.18.3/frontend/src/Components/NodeGroup.elm (about) 1 module Components.NodeGroup exposing (view) 2 3 import Api.Point as Point 4 import Components.NodeOptions exposing (NodeOptions, oToInputO) 5 import Element exposing (..) 6 import Element.Border as Border 7 import UI.Icon as Icon 8 import UI.NodeInputs as NodeInputs 9 import UI.Style exposing (colors) 10 11 12 view : NodeOptions msg -> Element msg 13 view o = 14 column 15 [ width fill 16 , Border.widthEach { top = 2, bottom = 0, left = 0, right = 0 } 17 , Border.color colors.black 18 , spacing 6 19 ] 20 <| 21 wrappedRow [ spacing 10 ] 22 [ Icon.users 23 , text <| 24 Point.getText o.node.points Point.typeDescription "" 25 ] 26 :: (if o.expDetail then 27 let 28 opts = 29 oToInputO o 100 30 31 textInput = 32 NodeInputs.nodeTextInput opts "0" 33 in 34 [ textInput Point.typeDescription "Description" "" 35 , NodeInputs.nodeKeyValueInput opts Point.typeTag "Tags" "Add Tag" 36 ] 37 38 else 39 [] 40 )