0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

add labels to lightbox

This commit is contained in:
Juan de la Cruz 2016-12-22 09:32:09 +01:00
parent 960f2e7e7a
commit 177fa4621c
3 changed files with 43 additions and 25 deletions

View file

@ -56,7 +56,7 @@
.input-text {
margin-right: $small;
// width: 35%;
margin-top: 0;
}
.toggle-layout {
@ -108,6 +108,21 @@
&.big-lightbox {
width: 800px;
}
.input-element {
flex-direction: column;
&::after {
top: 50%;
}
span {
color: $intense-ui-text;
font-size: $fs12;
margin-left: $small;
}
}
}
}

View file

@ -317,31 +317,35 @@
[:div.lightbox-body
[:h3 "New project"]
[:form {:on-submit (constantly nil)}
[:input#project-name.input-text
[:input#project-name.input-text
{:placeholder "New project name"
:type "text"
:value name
:auto-focus true
:on-change #(swap! local assoc :name (.-value (.-target %)))}]
[:div.project-size
[:input#project-witdh.input-text
{:placeholder "Width"
:type "number"
:min 0 ;;TODO check this value
:max 666666 ;;TODO check this value
:value width
:on-change #(swap! local assoc :width (.-value (.-target %)))}]
[:div.input-element.pixels
[:span "Width"]
[:input#project-witdh.input-text
{:placeholder "Width"
:type "number"
:min 0 ;;TODO check this value
:max 666666 ;;TODO check this value
:value width
:on-change #(swap! local assoc :width (.-value (.-target %)))}]]
[:a.toggle-layout
{:href "#"
:on-click #(swap! local assoc :width width :height height)}
i/toggle]
[:input#project-height.input-text
{:placeholder "Height"
:type "number"
:min 0 ;;TODO check this value
:max 666666 ;;TODO check this value
:value height
:on-change #(swap! local assoc :height (.-value (.-target %)))}]]
[:div.input-element.pixels
[:span "Height"]
[:input#project-height.input-text
{:placeholder "Height"
:type "number"
:min 0 ;;TODO check this value
:max 666666 ;;TODO check this value
:value height
:on-change #(swap! local assoc :height (.-value (.-target %)))}]]]
;; Layout selector
(layout-selector local)
;; Submit

View file

@ -92,7 +92,7 @@
:on-change update-name}]
[:div.project-size
[:div.input-element.pixels
[:input#project-witdh.input-text
[:span "Width"] [:input#project-witdh.input-text
{:placeholder "Width"
:type "number"
:min 0
@ -101,13 +101,14 @@
:on-change #(update-size :width %)}]]
[:a.toggle-layout {:on-click toggle-sizes} i/toggle]
[:div.input-element.pixels
[:span "Height"]
[:input#project-height.input-text
{:placeholder "Height"
:type "number"
:min 0
:max 4000
:value (:height data)
:on-change #(update-size :height %)}]]]
{:placeholder "Height"
:type "number"
:min 0
:max 4000
:value (:height data)
:on-change #(update-size :height %)}]]]
[:div.input-radio.radio-primary
(layout-input data "mobile")
@ -141,5 +142,3 @@
(defmethod lbx/render-lightbox :page-form
[{:keys [page]}]
(page-form-lightbox page))