Protected
_classProtected
_loadingProtected
_propsProtected
_svgCache for svg parsing intermediates
Protected
_svgProtected
_svgProtected
_svgProtected
_svgstrProtected
_uuidReadonly
nameThe name of the icon. By convention, the icon name will be namespaced as so:
"pkg-name:icon-name"
Readonly
reactA React component that will create the icon.
a string that will be used as the class of the container element. Overrides any existing class
a preexisting DOM element that will be used as the container for the svg element
text that will be displayed adjacent to the icon
a tooltip for the icon
if container is not explicitly provided, this tag will be used when creating the container
optional string naming a builtin icon
stylesheet, for example 'menuItem' or statusBar
. Can also be an
object defining a custom icon stylesheet, or a list of builtin
stylesheet names and/or custom stylesheet objects. If array,
the given stylesheets will be merged.
See @jupyterlab/ui-components/src/style/icon.ts for details
optional position for the inner svg element
optional size for the inner svg element. Set to 'normal' to get a standard 16px x 16px icon
all additional args are treated as overrides for the CSS props applied to the inner svg element
forwarded to the ref prop of the icon's svg element
Private
Static
_debugPrivate
Static
_instancesProtected
svgProtected
svgProtected
svgA string containing the raw contents of an svg file.
A string containing the raw contents of an svg file.
Protected
_initProtected
_initProtected
_initOptional
title?: stringOptional
uuid?: stringCreate an icon as a DOM element
A DOM element that contains an (inline) svg element that displays an icon
Optional
options: LabIcon.IRendererOptionsOptional
unrenderOptional
options: LabIcon.IRendererOptionsStatic
removeRemove any rendered icon from the element that contains it
a DOM node into which an icon was previously rendered
the cleaned container
Static
resolveResolve an icon name or a {name, svgstr} pair into an actual LabIcon.
icon: either a string with the name of an existing icon or an object with {name: string, svgstr: string} fields.
a LabIcon instance
Static
resolveResolve an icon name or a {name, svgstr} pair into a DOM element. If icon arg is undefined, the function will fall back to trying to render the icon as a CSS background image, via the iconClass arg. If both icon and iconClass are undefined, this function will return an empty div.
a DOM node with the resolved icon rendered into it
Static
resolveResolve an icon name or a {name, svgstr} pair into a React component. If icon arg is undefined, the function will fall back to trying to render the icon as a CSS background image, via the iconClass arg. If both icon and iconClass are undefined, the returned component will simply render an empty div.
a React component that will render the resolved icon
Static
resolveResolve a {name, svgstr} pair into an actual svg node.
Static
toggle
The ILabIcon interface. Outside of this interface the actual implementation of LabIcon may vary