Skip to content

Commit

Permalink
🎨 more consistent eval box (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymcdermott authored Aug 5, 2019
1 parent 3c647de commit e4b4752
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/replete/editor.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,21 @@

(def ^:private main-style
{:position "absolute"
:padding "5px"
:padding "0px"
:left "0px"
:right "0px"
:top "0px"
:bottom "0px"
:width "100%"})

(def ^:private box-style
(def ^:private editor-style
(merge (flex-child-style "1")
{:border "1px solid lightgrey"
:border-radius "4px"}))

(def ^:private eval-style
(flex-child-style "1"))

(defn- key-binding
[key-map [button event]]
(assoc {} (get key-map button) #(re-frame/dispatch [event])))
Expand All @@ -99,15 +104,15 @@
eval-cm-opts {:theme "replete-eval-light"}
eval-box-opts {:opts eval-opts
:cm-opts eval-cm-opts
:style box-style}
:style eval-style}

extra-keys (extra-key-bindings @key-bindings event-bindings)
edit-cm-opts {:theme "replete-edit-light"
:extraKeys extra-keys}
edit-box-opts {:opts {:node-id "replete-input"}
:cm-opts edit-cm-opts
:key-bindings @key-bindings
:style box-style}]
:style editor-style}]
[box
:style main-style
:child
Expand Down

0 comments on commit e4b4752

Please sign in to comment.