diff --git a/packages/webawesome/docs/_layouts/component.njk b/packages/webawesome/docs/_layouts/component.njk index 5225cc64d..42c6425d0 100644 --- a/packages/webawesome/docs/_layouts/component.njk +++ b/packages/webawesome/docs/_layouts/component.njk @@ -264,6 +264,9 @@ The autoloader is the recommended way to import components. If you prefer to do it manually, use one of the following code snippets.
+ + {% set componentName = component.tagName | stripPrefix %} + {% set componentPath = ["components/", componentName, "/", componentName, ".js"] | join("") %}To manually import this component from the CDN, use the following code.
-import '{% cdnUrl component.path %}';
+
+ import '{% cdnUrl componentPath %}';
+ To manually import this component from NPM, use the following code. +
+import '@awesome.me/webawesome/dist/components/{{ componentPath }}';
To manually import this component from React, use the following code.
-import '@shoelace-style/webawesome/react/{{ component.tagName | stripPrefix }}';
- #}
+ import '@awesome.me/webawesome/dist/react/{{ componentName }}';