index.d.ts 919 B

1234567891011121314151617181920212223242526
  1. import React from 'react';
  2. import type { ArgsProps, GlobalConfigProps } from './interface';
  3. import PurePanel from './PurePanel';
  4. import useNotification from './useNotification';
  5. export type { ArgsProps };
  6. interface BaseMethods {
  7. open: (config: ArgsProps) => void;
  8. destroy: (key?: React.Key) => void;
  9. config: (config: GlobalConfigProps) => void;
  10. useNotification: typeof useNotification;
  11. /** @private Internal Component. Do not use in your production. */
  12. _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
  13. }
  14. type StaticFn = (config: ArgsProps) => void;
  15. interface NoticeMethods {
  16. success: StaticFn;
  17. info: StaticFn;
  18. warning: StaticFn;
  19. error: StaticFn;
  20. }
  21. declare const staticMethods: NoticeMethods & BaseMethods;
  22. declare const actWrapper: (wrapper: any) => void;
  23. export { actWrapper };
  24. declare const actDestroy: () => void;
  25. export { actDestroy };
  26. export default staticMethods;