PhotoProvider.d.ts 821 B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. import { onShowType, addItemType, removeItemType } from './photo-context';
  3. import { dataType, IPhotoProviderBase } from './types';
  4. export interface IPhotoProvider extends IPhotoProviderBase {
  5. children: React.ReactNode;
  6. }
  7. declare type PhotoProviderState = {
  8. images: dataType[];
  9. visible: boolean;
  10. index: number;
  11. onShow: onShowType;
  12. addItem: addItemType;
  13. removeItem: removeItemType;
  14. };
  15. export default class PhotoProvider extends React.Component<IPhotoProvider, PhotoProviderState> {
  16. constructor(props: any);
  17. handleAddItem: addItemType;
  18. handleRemoveItem: (key: string) => void;
  19. handleShow: (key: string) => void;
  20. handleClose: () => void;
  21. handleIndexChange: (index: number) => void;
  22. render(): JSX.Element;
  23. }
  24. export {};