weg-shared-layout 0.0.8 → 0.0.10
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 +8 -5
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# weg-shared-layout
|
|
4
4
|
|
|
5
|
-
> Shared layout Web Components
|
|
5
|
+
> Shared layout Web Components.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -12,14 +12,17 @@ npm i weg-shared-layout
|
|
|
12
12
|
|
|
13
13
|
## How it works
|
|
14
14
|
|
|
15
|
-
`<weg-footer>` is a **presentational** Web Component: it does **not** fetch data.
|
|
15
|
+
`<weg-footer>` is a **presentational** Web Component: it does **not** fetch data.
|
|
16
|
+
|
|
17
|
+
You **can** load that object however you normally fetch JSON in your app. 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.
|
|
16
18
|
|
|
17
19
|
The payload shape matches **`dummy-data.json`**:
|
|
18
20
|
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
+
- **From npm:** `import layout from 'weg-shared-layout/dummy-data.json'` (enable `resolveJsonModule` in TypeScript if needed).
|
|
22
|
+
|
|
23
|
+
- **In this repo:** [`src/assets/dummy-data.json`](src/assets/dummy-data.json)
|
|
24
|
+
|
|
21
25
|
|
|
22
|
-
Only `social.platform` values `LinkedIn`, `Instagram`, `TikTok`, and `YouTube` render an icon; items with missing or invalid fields are dropped.
|
|
23
26
|
|
|
24
27
|
## Framework guides
|
|
25
28
|
|