mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 22:26:11 +02:00
✨ Replace custom all-spaces? fn with generic str/blank?
This commit is contained in:
parent
96822082bd
commit
f095e1b29f
1 changed files with 3 additions and 4 deletions
|
@ -17,7 +17,6 @@
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.dropdown :refer [dropdown]]
|
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||||
[app.main.ui.components.forms :as fm]
|
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
|
@ -96,7 +95,7 @@
|
||||||
(let [show-buttons? (mf/use-state false)
|
(let [show-buttons? (mf/use-state false)
|
||||||
content (mf/use-state "")
|
content (mf/use-state "")
|
||||||
|
|
||||||
disabled? (or (fm/all-spaces? @content)
|
disabled? (or (str/blank? @content)
|
||||||
(str/empty-or-nil? @content))
|
(str/empty-or-nil? @content))
|
||||||
|
|
||||||
on-focus
|
on-focus
|
||||||
|
@ -155,7 +154,7 @@
|
||||||
pos-x (* (:x position) zoom)
|
pos-x (* (:x position) zoom)
|
||||||
pos-y (* (:y position) zoom)
|
pos-y (* (:y position) zoom)
|
||||||
|
|
||||||
disabled? (or (fm/all-spaces? content)
|
disabled? (or (str/blank? content)
|
||||||
(str/empty-or-nil? content))
|
(str/empty-or-nil? content))
|
||||||
|
|
||||||
on-esc
|
on-esc
|
||||||
|
@ -225,7 +224,7 @@
|
||||||
(mf/deps @content)
|
(mf/deps @content)
|
||||||
(fn [] (on-submit @content)))
|
(fn [] (on-submit @content)))
|
||||||
|
|
||||||
disabled? (or (fm/all-spaces? @content)
|
disabled? (or (str/blank? @content)
|
||||||
(str/empty-or-nil? @content))]
|
(str/empty-or-nil? @content))]
|
||||||
|
|
||||||
[:div {:class (stl/css :edit-form)}
|
[:div {:class (stl/css :edit-form)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue