Skip to content

Commit ba7b11c

Browse files
committed
docs: update README to reflect changes in plugins prop type to PluginConfig[]
1 parent 7ecaa76 commit ba7b11c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ type ViewerConfig = {
278278
panorama?: any;
279279
/** @default equirectangular */
280280
adapter?: AdapterConstructor | [AdapterConstructor, any];
281-
plugins?: Array<PluginConstructor | [PluginConstructor, any]>;
281+
plugins?: PluginConfig[];
282282
/** @default null */
283283
caption?: string;
284284
/** @default null */
@@ -347,6 +347,8 @@ To use the standard plugins provided by the original library, you need to pass t
347347
348348
> The only "third-party" plugin that is supported at the moment is the "Lensflare" plugin. To use it, you need to import it from the "photo-sphere-viewer-lensflare-plugin" package. This plugin is made by me and it is not included in the original library.
349349
350+
> For Typescript users: the plugin array type is `PluginConfig[]` and you can import it from the library.
351+
350352
```jsx
351353
import { ReactPhotoSphereViewer } from "react-photo-sphere-viewer";
352354
import { LensflarePlugin } from "photo-sphere-viewer-lensflare-plugin";

0 commit comments

Comments
 (0)