-
-
Notifications
You must be signed in to change notification settings - Fork 748
Closed
Labels
questionQuestion about functionalityQuestion about functionality
Description
Hello! I am the author of the typedoc-theme-hierarchy library. I have a problem with icons
Prior to version 0.23.2, I simply set the css class tsd-kind-icon for links and subItem.cssClasses for list items:
<li class={subItem.cssClasses}>
<a
class='tsd-kind-icon'
href={urlTo(subItem)}
>
{subItem.name}
</a>
</li>And the icons appeared. But since version 0.23.2 icons in the default theme are set in a different way
| export const icons: Record<ReflectionKind, () => JSX.Element> & UtilityIcons = { |
I tried to import:
import { icons } from 'typedoc/dist/lib/output/themes/default/partials/icon';And change the code to the following:
<li>
<a href={urlTo(subItem)}>
{icons[subItem.kind]}
{subItem.name}
</a>
</li>Now, when I try to run the typedoc command, I get the following error:
error The plugin typedoc-theme-hierarchy could not be loaded.
error Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist/lib/output/themes/default/partials/icon' is not defined by "exports" in /Users/difuks/PhpstormProjects/typedoc-test/node_modules/typedoc/package.json
As I understand it, this is due to the definition of the exports field in package.json
https://github.com/TypeStrong/typedoc/blob/master/package.json#L7
But I still could not correctly import the variable icons
Metadata
Metadata
Assignees
Labels
questionQuestion about functionalityQuestion about functionality