Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 62d3ea0

Browse files
doc(#118):add srcset and sizes to lazy-img component
1 parent 02447b2 commit 62d3ea0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/docs/components/app-components-lazy-img/app-components-lazy-img.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ This component offers the following options which could be set using attributes:
3232
| Attribute | Type | Default | Description |
3333
| -------------------------- |-----------------|-----------------|-----------------|
3434
| img-src | string | | The image source (= URI) to lazy load |
35+
| img-src-set | string | | The attribute "srcset" (= multiple URI) to lazy load in case you would like to provide multiple images for responsiveness |
36+
| img-sizes | string | | The set of media conditions to indicates what image size would be best to choose |
3537
| img-alt | string | | The image alternate text |
3638
| observer-root-margin | string | 100px 0px | A string which specifies a set of offsets to add to the root's bounding_box when calculating intersections, effectively shrinking or growing the root for calculation purposes. [More info.](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver) |
3739
| observer-threshold | number or number[] | | Either a single number or an array of numbers between 0.0 and 1.0, specifying a ratio of intersection area to total bounding box area for the observed target. [More info.](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver) |

docs/src/app/pages/docs/components/app-components-lazy-img/app-components-lazy-img.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ export class AppComponentsLazyImg {
6565
<td>The image source (= URI) to lazy load</td>
6666
</tr>
6767
<tr>
68+
<td>img-src-set</td>
69+
<td>string</td>
70+
<td></td>
71+
<td>The attribute &quot;srcset&quot; (= multiple URI) to lazy load in case you would like to provide multiple images for responsiveness</td>
72+
</tr>
73+
<tr>
74+
<td>img-sizes</td>
75+
<td>string</td>
76+
<td></td>
77+
<td>The set of media conditions to indicates what image size would be best to choose</td>
78+
</tr>
79+
<tr>
6880
<td>img-alt</td>
6981
<td>string</td>
7082
<td></td>

0 commit comments

Comments
 (0)