@avalabs/k2-alpine 0.0.0-main-ae56d75 → 0.0.0-main-c5f3a1f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +11 -2
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2143 -2074
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { CoreTheme } from '../../theme';
|
|
3
|
+
import { DefaultToastOptions } from '../Toast/Toast';
|
|
3
4
|
type ThemeProviderProps = {
|
|
4
5
|
theme: CoreTheme;
|
|
6
|
+
defaultToastOptions?: DefaultToastOptions;
|
|
5
7
|
};
|
|
6
8
|
export declare const ThemeProvider: import('react').NamedExoticComponent<PropsWithChildren<ThemeProviderProps>>;
|
|
7
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ToastType = 'info' | 'success' | 'critical' | 'error' | 'suspicious' | 'scam' | 'custom' | 'basic';
|
|
1
|
+
export type ToastType = 'info' | 'success' | 'critical' | 'error' | 'suspicious' | 'scam' | 'custom' | 'basic' | 'pending';
|
|
2
2
|
export type ToastPosition = {
|
|
3
3
|
vertical: 'top' | 'bottom';
|
|
4
4
|
horizontal: 'left' | 'center' | 'right';
|
|
@@ -12,7 +12,11 @@ export type ToastOptions = {
|
|
|
12
12
|
description?: string;
|
|
13
13
|
action?: React.ReactNode;
|
|
14
14
|
icon?: React.ReactNode;
|
|
15
|
+
extension?: boolean;
|
|
16
|
+
top?: number;
|
|
15
17
|
};
|
|
18
|
+
export type DefaultToastOptions = Partial<Omit<ToastOptions, 'id' | 'type'>>;
|
|
19
|
+
export declare const useToastDefaults: () => Partial<Omit<ToastOptions, "id" | "type">>;
|
|
16
20
|
export declare const toast: {
|
|
17
21
|
info: (title: string, options?: ToastOptions) => string | number;
|
|
18
22
|
success: (title: string, options?: ToastOptions) => string | number;
|
|
@@ -20,9 +24,14 @@ export declare const toast: {
|
|
|
20
24
|
error: (title: string, options?: ToastOptions) => string | number;
|
|
21
25
|
suspicious: (title: string, options?: ToastOptions) => string | number;
|
|
22
26
|
scam: (title: string, options?: ToastOptions) => string | number;
|
|
27
|
+
pending: (title: string, options?: ToastOptions) => string | number;
|
|
23
28
|
custom: (title: string, options?: ToastOptions) => string | number;
|
|
24
29
|
show: (title: string, options?: ToastOptions) => string | number;
|
|
25
30
|
dismiss: (id: string) => void;
|
|
26
31
|
dismissAll: () => void;
|
|
27
32
|
};
|
|
28
|
-
|
|
33
|
+
type ToasterComponentProps = {
|
|
34
|
+
defaultOptions?: DefaultToastOptions;
|
|
35
|
+
};
|
|
36
|
+
export declare const Toaster: ({ defaultOptions }: ToasterComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export {};
|