Custom icon in a launcher card #7887
Labels
status:resolved-locked
Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone
At the moment in 1.x, users can pass an
iconClass
to a command:And define an icon as CSS background:
The icon should show up correctly in the launcher card.
In 2.x, it looks like the DOM element is not created unless a new
LabIcon
was instantiated beforehand:jupyterlab/packages/ui-components/src/icon/labicon.tsx
Lines 218 to 221 in b66bb79
See this commit as an example: jupyterlab/extension-examples@b81943d
It works for the default icons in core because their
LabIcon
is defined iniconimports.ts
.I wonder if the behavior in 1.x should be kept (keeping the DOM element with the CSS class)? When a user sees "class" in
iconClass
, she might expect it to correspond to the class added to the DOM element, which could then be styled in CSS.Maybe something to consider in #7864? cc @telamonian
The text was updated successfully, but these errors were encountered: