Commit f6d38fa5 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[bootstrap v4] corpus page styling

parent 0139553e
...@@ -219,22 +219,25 @@ fieldCodeEditorWrapperCpt :: R.Component FieldCodeEditorProps ...@@ -219,22 +219,25 @@ fieldCodeEditorWrapperCpt :: R.Component FieldCodeEditorProps
fieldCodeEditorWrapperCpt = R.hooksComponentWithModule thisModule "fieldCodeEditorWrapperCpt" cpt fieldCodeEditorWrapperCpt = R.hooksComponentWithModule thisModule "fieldCodeEditorWrapperCpt" cpt
where where
cpt props@{canMoveDown, canMoveUp, field: Field {name, typ}, onMoveDown, onMoveUp, onRemove, onRename} _ = do cpt props@{canMoveDown, canMoveUp, field: Field {name, typ}, onMoveDown, onMoveUp, onRemove, onRename} _ = do
pure $ H.div { className: "row panel panel-default" } [ pure $ H.div { className: "row card" } [
H.div { className: "panel-heading" } [ H.div { className: "card-header" } [
H.div { className: "code-editor-heading" } [ H.div { className: "code-editor-heading row" } [
renameable {onRename, text: name} H.div { className: "col-sm-4" } [
, H.div { className: "buttons-right" } [ renameable {onRename, text: name}
]
, H.div { className: "col-sm-7" } []
, H.div { className: "buttons-right col-sm-1" } [
H.div { className: "btn btn-danger" H.div { className: "btn btn-danger"
, on: { click: \_ -> onRemove unit } , on: { click: \_ -> onRemove unit }
} [ } [
H.span { className: "fa fa-trash" } [ ] H.span { className: "fa fa-trash" } [ ]
] ]
]
, moveDownButton canMoveDown , moveDownButton canMoveDown
, moveUpButton canMoveUp , moveUpButton canMoveUp
]
] ]
] ]
, H.div { className: "panel-body" } [ , H.div { className: "card-body" } [
fieldCodeEditor props fieldCodeEditor props
] ]
] ]
...@@ -297,25 +300,28 @@ renameableTextCpt :: R.Component RenameableTextProps ...@@ -297,25 +300,28 @@ renameableTextCpt :: R.Component RenameableTextProps
renameableTextCpt = R.hooksComponentWithModule thisModule "renameableTextCpt" cpt renameableTextCpt = R.hooksComponentWithModule thisModule "renameableTextCpt" cpt
where where
cpt {isEditing: (false /\ setIsEditing), state: (text /\ _)} _ = do cpt {isEditing: (false /\ setIsEditing), state: (text /\ _)} _ = do
pure $ H.div {} [ pure $ H.div { className: "input-group" } [
H.span { className: "text" } [ H.text text ] H.input { className: "form-control"
, H.span { className: "btn btn-default" , defaultValue: text
, on: { click: \_ -> setIsEditing $ const true } } [ , disabled: 1
, type: "text" }
, H.div { className: "btn input-group-append"
, on: { click: \_ -> setIsEditing $ const true } } [
H.span { className: "fa fa-pencil" } [] H.span { className: "fa fa-pencil" } []
] ]
] ]
cpt {isEditing: (true /\ setIsEditing), onRename, state: (text /\ setText)} _ = do cpt {isEditing: (true /\ setIsEditing), onRename, state: (text /\ setText)} _ = do
pure $ H.div {} [ pure $ H.div { className: "input-group" } [
inputWithEnter { inputWithEnter {
onEnter: submit autoFocus: false
, onValueChanged: setText <<< const
, autoFocus: false
, className: "form-control text" , className: "form-control text"
, defaultValue: text , defaultValue: text
, onEnter: submit
, onValueChanged: setText <<< const
, placeholder: "" , placeholder: ""
, type: "text" , type: "text"
} }
, H.span { className: "btn btn-default" , H.div { className: "btn input-group-append"
, on: { click: submit } } [ , on: { click: submit } } [
H.span { className: "fa fa-floppy-o" } [] H.span { className: "fa fa-floppy-o" } []
] ]
......
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