weg-shared-layout 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/readme.md +25 -0
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -134,6 +134,31 @@ Or:
|
|
|
134
134
|
import 'weg-shared-layout';
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
+
### Next.js (App Router) note
|
|
138
|
+
|
|
139
|
+
Stencil custom elements must be registered **in the browser**. If you’re using Next.js `app/` (App Router), don’t import/register Stencil components from a Server Component.
|
|
140
|
+
|
|
141
|
+
Instead, register them in a Client Component, for example:
|
|
142
|
+
|
|
143
|
+
```tsx
|
|
144
|
+
// app/components/WegFooterClient.tsx
|
|
145
|
+
"use client";
|
|
146
|
+
|
|
147
|
+
import "weg-shared-layout/weg-footer";
|
|
148
|
+
|
|
149
|
+
export function WegFooterClient() {
|
|
150
|
+
return (
|
|
151
|
+
<weg-footer
|
|
152
|
+
variant="standard"
|
|
153
|
+
company-name="WEG"
|
|
154
|
+
company-number="12345678"
|
|
155
|
+
social-links-src="/assets/footer-social-links.json"
|
|
156
|
+
standard-links-src="/assets/footer-standard-links.json"
|
|
157
|
+
/>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
137
162
|
Use the footer (standard):
|
|
138
163
|
|
|
139
164
|
```tsx
|