MinJieLiu пре 5 година
родитељ
комит
6befebddf6
2 измењених фајлова са 24 додато и 1 уклоњено
  1. 9 0
      example/src/index.tsx
  2. 15 1
      example/src/stories/Test.stories.mdx

+ 9 - 0
example/src/index.tsx

@@ -1,6 +1,9 @@
 import * as React from 'react';
 import styled from 'styled-components';
 import { PhotoSlider } from 'react-photo-view';
+import { IPhotoProvider } from 'react-photo-view/dist/PhotoProvider';
+import { IPhotoConsumer } from 'react-photo-view/dist/PhotoConsumer';
+import { IPhotoSliderProps } from 'react-photo-view/dist/PhotoSlider';
 
 export const photoImages = [
   '1.jpg',
@@ -80,3 +83,9 @@ export const ControlledView = () => {
     </ImageList>
   );
 };
+
+export function IPhotoProviderForwardProps(props: IPhotoProvider) {}
+
+export function IPhotoConsumerForwardProps(props: IPhotoProvider) {}
+
+export function IPhotoSliderForwardProps(props: IPhotoProvider) {}

+ 15 - 1
example/src/stories/Test.stories.mdx

@@ -9,6 +9,10 @@ import {
   Button,
   DefaultImage,
   ControlledView,
+  
+  IPhotoProviderForwardProps,
+  IPhotoConsumerForwardProps,
+  IPhotoSliderForwardProps,
 } from '../';
 
 <Meta title="React-photo-view" />
@@ -88,4 +92,14 @@ import {
 
 # Props
 
-<Props of={PhotoConsumer} />
+### PhotoProvider
+
+<Props of={IPhotoProviderForwardProps} />
+
+### PhotoConsumer
+
+<Props of={IPhotoConsumerForwardProps} />
+
+### PhotoSlider
+
+<Props of={IPhotoSliderForwardProps} />