Skip to content

Commit

Permalink
Changed things like (if width width "250px") to (or width "250px")
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregg8 committed May 25, 2017
1 parent ebb07ba commit cec6cf7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/re_com/buttons.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
:child (if tooltip
[popover-tooltip
:label tooltip
:position (if tooltip-position tooltip-position :below-center)
:position (or tooltip-position :below-center)
:showing? showing?
:anchor the-button]
the-button)]))))
Expand Down Expand Up @@ -115,7 +115,7 @@
:child (if tooltip
[popover-tooltip
:label tooltip
:position (if tooltip-position tooltip-position :below-center)
:position (or tooltip-position :below-center)
:showing? showing?
:anchor the-button]
the-button)]))))
Expand Down Expand Up @@ -175,7 +175,7 @@
:child (if tooltip
[popover-tooltip
:label tooltip
:position (if tooltip-position tooltip-position :below-center)
:position (or tooltip-position :below-center)
:showing? showing?
:anchor the-button]
the-button)]))))
Expand Down Expand Up @@ -206,8 +206,8 @@
[popover-tooltip
:label info
:status :info
:position (if position position :right-below)
:width (if width width "250px")
:position (or position :right-below)
:width (or width "250px")
:showing? showing?
:on-cancel #(swap! showing? not)
:anchor [:div
Expand Down Expand Up @@ -269,7 +269,7 @@
:child (if tooltip
[popover-tooltip
:label tooltip
:position (if tooltip-position tooltip-position :below-center)
:position (or tooltip-position :below-center)
:showing? showing?
:anchor the-button]
the-button)]))))
Expand Down Expand Up @@ -325,7 +325,7 @@
:child (if tooltip
[popover-tooltip
:label tooltip
:position (if tooltip-position tooltip-position :below-center)
:position (or tooltip-position :below-center)
:showing? showing?
:anchor the-button]
the-button)]))))
Expand Down Expand Up @@ -376,7 +376,7 @@
:child (if tooltip
[popover-tooltip
:label tooltip
:position (if tooltip-position tooltip-position :below-center)
:position (or tooltip-position :below-center)
:showing? showing?
:anchor the-button]
the-button)]))))
4 changes: 2 additions & 2 deletions src/re_com/misc.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
:input "text"
:password "password"
nil)
:rows (when (= input-type :textarea) (if rows rows 3))
:rows (when (= input-type :textarea) (or rows 3))
:style (merge
(flex-child-style "none")
{:height height
Expand Down Expand Up @@ -332,7 +332,7 @@
(flex-child-style "none")
{;:-webkit-appearance "slider-vertical" ;; TODO: Make a :orientation (:horizontal/:vertical) option
;:writing-mode "bt-lr" ;; Make IE slider vertical
:width (if width width "400px")
:width (or width "400px")
:cursor (if disabled? "not-allowed" "default")}
style)
:min min
Expand Down
12 changes: 6 additions & 6 deletions src/re_com/popover.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
popover-left (case pop-orient
:left "initial" ;; TODO: Ultimately remove this (must have NO :left which is in Bootstrap .popover class)
:right (px total-offset)
(:above :below) (px (if pop-offset pop-offset (/ p-width 2)) :negative))
(:above :below) (px (or pop-offset (/ p-width 2)) :negative))
popover-top (case pop-orient
(:left :right) (px (if pop-offset pop-offset (/ p-height 2)) :negative)
(:left :right) (px (or pop-offset (/ p-height 2)) :negative)
:above "initial"
:below (px total-offset))
popover-right (case pop-orient
Expand Down Expand Up @@ -157,7 +157,7 @@
:width "100%"
:height "100%"
:background-color "black"
:opacity (if opacity opacity 0.0)}
:opacity (or opacity 0.0)}
:on-click (handler-fn (on-click))}])


Expand Down Expand Up @@ -288,9 +288,9 @@
(when pop-id (calc-popover-pos orientation @p-width @p-height @pop-offset arrow-length arrow-gap))
{:top "-10000px" :left "-10000px"})

(if width {:width width})
(if height {:height height})
(if popover-color {:background-color popover-color})
(when width {:width width})
(when height {:height height})
(when popover-color {:background-color popover-color})
(when tooltip-style?
{:border-radius "4px"
:box-shadow "none"
Expand Down

0 comments on commit cec6cf7

Please sign in to comment.