Skip to content

Commit

Permalink
remove fixed height
Browse files Browse the repository at this point in the history
  • Loading branch information
sprocketc committed Mar 16, 2024
1 parent f1d3c98 commit ee65180
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/renderer/attribute/angle.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
:placeholder initial}]
[:> Popover/Root {:modal true}
[:> Popover/Trigger {:asChild true}
[:button.button.ml-px.bg-primary.text-muted
{:style {:width "26px" :height "26px"}}
[:button.button.ml-px.bg-primary.text-muted.h-full
{:style {:width "26px"}}
[comp/icon "degrees" {:class "icon small"}]]]
[:> Popover/Portal
[:> Popover/Content
Expand Down
5 changes: 2 additions & 3 deletions src/renderer/attribute/d.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@
(when v
[:> Popover/Root {:modal true}
[:> Popover/Trigger {:asChild true}
[:button.ml-px.inline-block.bg-primary.text-muted
{:style {:flex "0 0 26px"
:height "26px"}}
[:button.ml-px.inline-block.bg-primary.text-muted.h-full
{:style {:flex "0 0 26px"}}
[comp/icon "pencil" {:class "icon small"}]]]
[:> Popover/Portal
[:> Popover/Content {:sideOffset 5
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/attribute/length.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
(rf/dispatch [:element/update-attr k - 1])
(rf/dispatch [:element/update-attr k + 1])))}]
[:div.flex {:style {:width "54px"}}
[:button.button.ml-px.bg-primary.text-muted
{:style {:width "26px" :height "26px"}
[:button.button.ml-px.bg-primary.text-muted.h-full
{:style {:width "26px"}
:on-pointer-down #(rf/dispatch [:element/update-attr k - 1])}
[comp/icon "minus" {:class "icon small"}]]
[:button.button..ml-px.bg-primary.text-muted
{:style {:width "26px" :height "26px"}
[:button.button..ml-px.bg-primary.text-muted.h-full
{:style {:width "26px"}
:on-click #(rf/dispatch [:element/update-attr k + 1])}
[comp/icon "plus" {:class "icon small"}]]]])

Expand Down
8 changes: 3 additions & 5 deletions src/renderer/attribute/points.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
[:> Popover/Root {:modal true}
[:> Popover/Trigger {:asChild true}
[:button.ml-px.inline-block.bg-primary.text-muted
{:style {:flex "0 0 26px"
:height "26px"}}
{:style {:flex "0 0 26px"}}
[comp/icon "pencil" {:class "icon small"}]]]
[:> Popover/Portal
[:> Popover/Content {:sideOffset 5
Expand All @@ -55,8 +54,7 @@
{:key (str "x-" index v) :default-value x}]
[:input.bg-transparent
{:key (str "y-" index v) :default-value y}]
[:button.button.bg-transparent.text-muted
{:style {:height "26px"}
:on-click #(remove-point-by-index points index)}
[:button.button.bg-transparent.text-muted.h-full
{:on-click #(remove-point-by-index points index)}
[comp/icon "times" {:class "icon small"}]]]) points)]))
[:> Popover/Arrow {:class "popover-arrow"}]]]])]))
33 changes: 18 additions & 15 deletions src/renderer/attribute/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
:on-blur #(on-change-handler % key value)
:on-key-down #(keyb/input-key-down-handler % value on-change-handler key value)}]
(when-not (or (empty? (str value)) disabled?)
[:button.button.ml-px.bg-primary.text-muted.absolute.right-0.clear-input-button.hover:bg-transparent
{:style {:width "26px" :height "26px"}
[:button.button.ml-px.bg-primary.text-muted.absolute.h-full.right-0.clear-input-button.hover:bg-transparent
{:style {:width "26px"}
:on-pointer-down #(rf/dispatch [:element/remove-attr key])}
[comp/icon "times" {:class "icon small"}]])])

Expand Down Expand Up @@ -121,19 +121,22 @@
(defn select-input
[{:keys [key value disabled? items initial]}]
[:div.flex.w-full
[form-input {:key key
:value value
:disabled? disabled?
:placeholder initial}]
[:> Select/Root {:value value
:onValueChange #(rf/dispatch [:element/set-attr key %])
:disabled disabled?}
[:> Select/Trigger {:class "select-trigger ml-px"
:aria-label (name key)
:style {:background "var(--bg-primary)"
:border-radius 0
:width "26px"
:height "26px"}}
[form-input
{:key key
:value value
:disabled? disabled?
:placeholder initial}]
[:> Select/Root
{:value value
:onValueChange #(rf/dispatch [:element/set-attr key %])
:disabled disabled?}
[:> Select/Trigger
{:class "select-trigger ml-px h-full"
:aria-label (name key)
:style {:background "var(--bg-primary)"
:border-radius 0
:width "26px"
:height "26px"}}
[:> Select/Value ""]
[:> Select/Icon
[comp/icon "chevron-down" {:class "icon small"}]]]
Expand Down

0 comments on commit ee65180

Please sign in to comment.