Icons.d.ts 872 B

123456789101112131415161718192021222324
  1. import React from 'react';
  2. import { Theme, ToastProps, TypeOptions } from '../types';
  3. /**
  4. * Used when providing custom icon
  5. */
  6. export interface IconProps {
  7. theme: Theme;
  8. type: TypeOptions;
  9. }
  10. export type BuiltInIconProps = React.SVGProps<SVGSVGElement> & IconProps;
  11. declare function Warning(props: BuiltInIconProps): React.JSX.Element;
  12. declare function Info(props: BuiltInIconProps): React.JSX.Element;
  13. declare function Success(props: BuiltInIconProps): React.JSX.Element;
  14. declare function Error(props: BuiltInIconProps): React.JSX.Element;
  15. declare function Spinner(): React.JSX.Element;
  16. export declare const Icons: {
  17. info: typeof Info;
  18. warning: typeof Warning;
  19. success: typeof Success;
  20. error: typeof Error;
  21. spinner: typeof Spinner;
  22. };
  23. export declare function getIcon({ theme, type, isLoading, icon }: ToastProps): React.ReactNode;
  24. export {};