1.3.6 • Published 6 months ago

@types/react-s-alert v1.3.6

Weekly downloads
1,649
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-s-alert

Summary

This package contains type definitions for react-s-alert (https://github.com/juliancwirko/react-s-alert).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-s-alert.

index.d.ts

// Type definitions for react-s-alert 1.3
// Project: https://github.com/juliancwirko/react-s-alert
// Definitions by: mitsuruog <https://github.com/mitsuruog>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as React from "react";

declare class SAlert extends React.Component<SAlert.SAlertProps> {}

declare namespace SAlert {
  interface SAlertConfigProps {
    position?: string | undefined;
    offset?: number | undefined;
    stack?: boolean | SAlertStackProps | undefined;
    effect?: string | undefined;
    beep?: string | boolean | SAlertBeepProps | undefined;
    timeout?: string | number | undefined;
    html?: boolean | undefined;
    onClose?: (() => void) | undefined;
    onShow?: (() => void) | undefined;
    customFields?: object | undefined;
    contentTemplate?: ((...args: any[]) => any) | undefined;
  }

  interface SAlertProps extends SAlertConfigProps {
    message?: string | undefined;
  }

  interface SAlertStackProps {
    limit?: number | undefined;
    spacing?: number | undefined;
  }

  interface SAlertBeepProps {
    info?: string | undefined;
    error?: string | undefined;
    warning?: string | undefined;
    success?: string | undefined;
  }

  function info(msg?: string, data?: SAlertConfigProps): number;

  function error(msg?: string, data?: SAlertConfigProps): number;

  function warning(msg?: string, data?: SAlertConfigProps): number;

  function success(msg?: string, data?: SAlertConfigProps): number;

  function close(id: number): void;

  function closeAll(): void;
}

export default SAlert;

Additional Details

  • Last updated: Thu, 08 Jul 2021 22:41:30 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by mitsuruog.