🐛 Fix color row erros from review (#7516)

* 🐛 Fix text Ellipsis on token color row

* 🐛 Fix show token only on first stroke

* 🐛 Fix detach broken token
This commit is contained in:
Eva Marco
2025-10-17 10:39:41 +02:00
committed by GitHub
parent f5761066a9
commit 2f27a78bc0
4 changed files with 14 additions and 6 deletions

View File

@@ -44,7 +44,7 @@
(let [attr? (set attributes)]
(->> (remove (fn [[k v]]
(and (attr? k)
(= v (token-identifier token))))
(= v (or (token-identifier token) token))))
applied-tokens)
(into {}))))

View File

@@ -83,8 +83,10 @@
on-detach-token
(mf/use-fn
(mf/deps detach-token token)
#(detach-token token))
(mf/deps detach-token token color-token)
(fn []
(let [token (or token color-token)]
(detach-token token))))
has-errors (some? (:errors token))
token-name (:name token)

View File

@@ -299,8 +299,12 @@
@include textEllipsis;
color: var(--token-color-wrapper-foreground-color);
block-size: $sz-32;
display: flex;
align-items: center;
line-height: $sz-32;
}
.token-tooltip {
min-width: 0;
inline-size: inherit;
}
.token-name-tooltip {

View File

@@ -192,7 +192,9 @@
:on-detach on-color-detach
:on-remove on-remove
:disable-drag disable-drag
:applied-token stroke-color-token
:applied-token (if (= index 0)
stroke-color-token
nil)
:on-detach-token on-detach-token-color
:on-token-change on-token-change
:on-focus on-focus