mirror of
https://github.com/penpot/penpot.git
synced 2026-11-05 09:30:38 +00:00
The token pill worked out inside the component whether its token is applied to the selection, whether it can apply to it at all and why the token is invalid, so no test could reach that logic. Move it into `pill-state`, and split the tooltip into `tooltip-info`, which decides what it says, and `render-tooltip`, which renders it. Both are pure and get unit tests for the applied, partial, disabled and error states and each tooltip case. The two chained `on-click` handlers become one. Nothing else changes in behavior. Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>