mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 10:09:03 -05:00
Merge pull request #138 from tokens-studio/124-disable-1password-completion
124 disable 1password completion
This commit is contained in:
commit
169d71b2df
1 changed files with 13 additions and 15 deletions
|
@ -22,20 +22,18 @@
|
||||||
|
|
||||||
;; Components ------------------------------------------------------------------
|
;; Components ------------------------------------------------------------------
|
||||||
|
|
||||||
(mf/defc input
|
|
||||||
{::mf/wrap-props false}
|
|
||||||
[{:keys [type placeholder]
|
|
||||||
:or {type "text"}}]
|
|
||||||
[:input {:type type
|
|
||||||
:class (stl/css :input)
|
|
||||||
:placeholder placeholder}])
|
|
||||||
|
|
||||||
(mf/defc labeled-input
|
(mf/defc labeled-input
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[{:keys [input-ref label default-value on-change auto-focus?]}]
|
[{:keys [input-ref label default-value on-change auto-focus? auto-complete?]}]
|
||||||
[:label {:class (stl/css :labeled-input)}
|
(let [input-props (cond-> {:ref input-ref
|
||||||
[:span {:class (stl/css :label)} label]
|
:default-value default-value
|
||||||
[:input {:ref input-ref
|
:autoFocus auto-focus?
|
||||||
:default-value default-value
|
:on-change on-change}
|
||||||
:autoFocus auto-focus?
|
;; Disable auto-complete on form fields for proprietary password managers
|
||||||
:on-change on-change}]])
|
;; https://github.com/orgs/tokens-studio/projects/69/views/11?pane=issue&itemId=63724204
|
||||||
|
(not auto-complete?) (assoc :data-1p-ignore true
|
||||||
|
:data-lpignore true
|
||||||
|
:autoComplete "off"))]
|
||||||
|
[:label {:class (stl/css :labeled-input)}
|
||||||
|
[:span {:class (stl/css :label)} label]
|
||||||
|
[:& :input input-props]]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue