ohctechv3/.svn/pristine/96/964ce02065cacc4675680e7dbf6c6d232aacf6c3.svn-base
2024-10-28 15:03:36 +05:30

27 lines
981 B
Plaintext

import React from 'react';
import { Theme, ToastProps, TypeOptions } from '../types';
/**
* Used when providing custom icon
*/
export interface IconProps {
theme: Theme;
type: TypeOptions;
isLoading?: boolean;
}
export type BuiltInIconProps = React.SVGProps<SVGSVGElement> & IconProps;
declare function Warning(props: BuiltInIconProps): React.JSX.Element;
declare function Info(props: BuiltInIconProps): React.JSX.Element;
declare function Success(props: BuiltInIconProps): React.JSX.Element;
declare function Error(props: BuiltInIconProps): React.JSX.Element;
declare function Spinner(): React.JSX.Element;
export declare const Icons: {
info: typeof Info;
warning: typeof Warning;
success: typeof Success;
error: typeof Error;
spinner: typeof Spinner;
};
export type IconParams = Pick<ToastProps, 'theme' | 'icon' | 'type' | 'isLoading'>;
export declare function getIcon({ theme, type, isLoading, icon }: IconParams): React.ReactNode;
export {};