@types/react-s-alert
TypeScript icon, indicating that this package has built-in type declarations

1.3.6 • Public • Published

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

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: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by mitsuruog.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-s-alert

Weekly Downloads

1,152

Version

1.3.6

License

MIT

Unpacked Size

5.56 kB

Total Files

5

Last publish

Collaborators

  • types