Skip to content

Commit 4ebddb0

Browse files
authored
Update plugin jsdocs (#132)
1 parent e13a6d6 commit 4ebddb0

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

packages/html/src/plugins/lazyload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import {isBrowser} from "../utils/isBrowser";
1414
* When using the plugin make sure to add dimensions, otherwise the images will load with
1515
* the size of 0x0, meaning the images will be in the viewport and trigger the lazyload plugin.
1616
* </caption>
17-
* <AdvancedImage style={{width: "400px", height: "400px"}} cldImg={img} plugins=[(lazyload({rootMargin: '0px',
18-
* threshold: 0.25}))]/>
17+
* <AdvancedImage style={{width: "400px", height: "400px"}} cldImg={img} plugins={[lazyload({rootMargin: '0px',
18+
* threshold: 0.25})]} />
1919
*/
2020
export function lazyload({rootMargin='0px', threshold=0.1}:{rootMargin?: string, threshold?: number}={}): Plugin{
2121
return lazyloadPlugin.bind(null, rootMargin, threshold);

packages/html/src/plugins/placeholder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {isImage} from "../utils/isImage";
1313
* @param mode {PlaceholderMode} The type of placeholder image to display. Possible modes: 'vectorize' | 'pixelate' | 'blur' | 'predominant-color'. Default: 'vectorize'.
1414
* @return {Plugin}
1515
* @example <caption>NOTE: The following is in React. For further examples, see the Packages tab.</caption>
16-
* <AdvancedImage cldImg={img} plugins=[(placeholder({mode: 'blur'}))]/>
16+
* <AdvancedImage cldImg={img} plugins={[placeholder({mode: 'blur'})]} />
1717
*/
1818
export function placeholder({mode='vectorize'}:{mode?: string}={}): Plugin{
1919
return placeholderPlugin.bind(null, mode);

packages/html/src/plugins/responsive.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ import {isImage} from "../utils/isImage";
1111
* @namespace
1212
* @description Updates the src with the size of the parent element and triggers a resize event for
1313
* subsequent resizing.
14-
* @param steps {number | number[]} The step size in pixels.
15-
* | number[] A set of image sizes in pixels.
14+
* @param steps {number | number[]} The step size in pixels or an array of image widths in pixels.
1615
* @return {Plugin}
1716
* @example <caption>NOTE: The following is in React. For further examples, see the Packages tab.</caption>
18-
* <AdvancedImage cldImg={img} plugins=[(responsive(100))] plugins=[(responsive({steps: [800, 1000, 1400]}))] />
17+
* <AdvancedImage cldImg={img} plugins={[responsive({steps: [800, 1000, 1400]})]} />
1918
*/
2019
export function responsive({steps}:{steps?: number | number[]}={}): Plugin{
2120
return responsivePlugin.bind(null, steps);
@@ -24,7 +23,6 @@ export function responsive({steps}:{steps?: number | number[]}={}): Plugin{
2423
/**
2524
* @description Responsive plugin
2625
* @param steps {number | number[]} The step size in pixels.
27-
* | number[] A set of image sizes in pixels.
2826
* @param element {HTMLImageElement} The image element
2927
* @param responsiveImage {CloudinaryImage}
3028
* @param htmlPluginState {HtmlPluginState} holds cleanup callbacks and event subscriptions

0 commit comments

Comments
 (0)