♻️ Migrate link-button component to rumext modern syntax (#9264)

Rename component from link-button to link-button* and remove the legacy
::mf/wrap-props false metadata. Update all callsites to use the modern
[:> lb/link-button* ...] syntax instead of [:& lb/link-button ...].

Part of the #9260 issue.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
Andrey Antukh 2026-05-08 09:53:12 +02:00 committed by GitHub
parent 61cd757355
commit 18e289b15a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 11 deletions

View File

@ -9,8 +9,7 @@
[app.util.keyboard :as kbd]
[rumext.v2 :as mf]))
(mf/defc link-button
{::mf/wrap-props false}
(mf/defc link-button*
[{:keys [on-click class value data-testid]}]
(let [on-key-down (mf/use-fn
(mf/deps on-click)

View File

@ -62,8 +62,8 @@
(when (some? links)
(for [[index link] (d/enumerate links)]
;; TODO Review this component
[:& lb/link-button {:class (stl/css :link)
:on-click (:callback link)
:value (:label link)
:key (dm/str "link-" index)}]))])]])
[:> lb/link-button* {:class (stl/css :link)
:on-click (:callback link)
:value (:label link)
:key (dm/str "link-" index)}]))])]])

View File

@ -30,7 +30,7 @@
(when (some? links)
[:nav {:class (stl/css :link-nav)}
(for [[index link] (d/enumerate links)]
[:& lb/link-button {:key (dm/str "link-" index)
:class (stl/css :link)
:on-click (:callback link)
:value (:label link)}])])])
[:> lb/link-button* {:key (dm/str "link-" index)
:class (stl/css :link)
:on-click (:callback link)
:value (:label link)}])])])

View File

@ -617,7 +617,7 @@
(when (or (pos? (:components exceeded))
(pos? (:colors exceeded))
(pos? (:typographies exceeded)))
[:& lb/link-button
[:> lb/link-button*
{:on-click see-all-assets
:class (stl/css :libraries-updates-see-all)
:value (str "(" (tr "workspace.libraries.update.see-all-changes") ")")}])])]])]]))