index.d.ts 1018 B

123456789101112131415161718192021222324252627282930
  1. import * as React from 'react';
  2. import type { Settings } from '@ant-design/react-slick';
  3. export type CarouselEffect = 'scrollx' | 'fade';
  4. export type DotPosition = 'top' | 'bottom' | 'left' | 'right';
  5. export interface CarouselProps extends Omit<Settings, 'dots' | 'dotsClass' | 'autoplay'> {
  6. effect?: CarouselEffect;
  7. style?: React.CSSProperties;
  8. prefixCls?: string;
  9. rootClassName?: string;
  10. id?: string;
  11. slickGoTo?: number;
  12. dotPosition?: DotPosition;
  13. children?: React.ReactNode;
  14. dots?: boolean | {
  15. className?: string;
  16. };
  17. waitForAnimate?: boolean;
  18. autoplay?: boolean | {
  19. dotDuration?: boolean;
  20. };
  21. }
  22. export interface CarouselRef {
  23. goTo: (slide: number, dontAnimate?: boolean) => void;
  24. next: () => void;
  25. prev: () => void;
  26. autoPlay: (playType?: 'update' | 'leave' | 'blur') => void;
  27. innerSlider: any;
  28. }
  29. declare const Carousel: React.ForwardRefExoticComponent<CarouselProps & React.RefAttributes<CarouselRef>>;
  30. export default Carousel;