weg-shared-layout 0.0.8 → 0.0.9
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 +2 -0
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -14,6 +14,8 @@ npm i weg-shared-layout
|
|
|
14
14
|
|
|
15
15
|
`<weg-footer>` is a **presentational** Web Component: it does **not** fetch data. Your app supplies an object on the element’s **`data` property** (Stencil `@Prop()`), not a string HTML attribute (unless you pass JSON as a string — see [Vanilla / HTML](./docs/vanilla.md)).
|
|
16
16
|
|
|
17
|
+
You **can** load that object however you normally fetch JSON in your stack (`fetch`, your data layer, server components, etc.). For example, [https://weg-payload-test.vercel.app/api/layout](https://weg-payload-test.vercel.app/api/layout) returns the same shape as **`dummy-data.json`**; pass the response into `data` on `<weg-footer>` (or your framework wrapper) like any other prop.
|
|
18
|
+
|
|
17
19
|
The payload shape matches **`dummy-data.json`**:
|
|
18
20
|
|
|
19
21
|
- **From npm:** `import layout from 'weg-shared-layout/dummy-data.json'` (enable `resolveJsonModule` in TypeScript if needed).
|