@linzjs/windows 5.1.1 → 5.2.1
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/README.md
CHANGED
|
@@ -9,8 +9,6 @@ React state based modals/windows are painful because they require:
|
|
|
9
9
|
- shared states for open/closed.
|
|
10
10
|
- callbacks/states for return values.
|
|
11
11
|
- inline modal/window includes, which prevent you from closing the invoking component before the modal/window has completed.
|
|
12
|
-
- multi-window dialogs.
|
|
13
|
-
- html5 dialog based.
|
|
14
12
|
|
|
15
13
|
This module gives you promise based modals/windows which don't require all the state
|
|
16
14
|
based boilerplate / inline-components.
|
|
@@ -7,7 +7,7 @@ import React, { PropsWithChildren, ReactElement, useContext } from 'react';
|
|
|
7
7
|
import { LuiModalAsyncInstanceContext } from './LuiModalAsyncInstanceContext';
|
|
8
8
|
|
|
9
9
|
export interface LuiModalAsyncHeaderProps {
|
|
10
|
-
icon?: LuiIconName | ReactElement;
|
|
10
|
+
icon?: LuiIconName | ReactElement | null;
|
|
11
11
|
title: string;
|
|
12
12
|
helpLink?: string;
|
|
13
13
|
onHelpClick?: () => void;
|
|
@@ -15,7 +15,7 @@ import { LuiModalAsyncHeader } from './LuiModalAsyncHeader';
|
|
|
15
15
|
import { LuiModalAsyncMain } from './LuiModalAsyncMain';
|
|
16
16
|
import { useShowAsyncModal } from './useShowAsyncModal';
|
|
17
17
|
|
|
18
|
-
export type PrefabType = 'success' | 'info' | 'warning' | 'error' | 'progress' | 'blocked';
|
|
18
|
+
export type PrefabType = 'outline' | 'success' | 'info' | 'warning' | 'error' | 'progress' | 'blocked';
|
|
19
19
|
|
|
20
20
|
export interface LuiModalAsyncPrefabButton<RT> {
|
|
21
21
|
default?: boolean;
|
|
@@ -40,7 +40,7 @@ export interface LuiModalAsyncPrefabProps<RT> extends useLuiModalPrefabProps<RT>
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
43
|
-
export const getIconForLevel = (level: PrefabType): IconName | 'custom_progress' => {
|
|
43
|
+
export const getIconForLevel = (level: PrefabType): IconName | 'custom_progress' | null => {
|
|
44
44
|
switch (level) {
|
|
45
45
|
case 'success':
|
|
46
46
|
return 'ic_check_circle_outline';
|
|
@@ -54,6 +54,8 @@ export const getIconForLevel = (level: PrefabType): IconName | 'custom_progress'
|
|
|
54
54
|
return 'custom_progress';
|
|
55
55
|
case 'blocked':
|
|
56
56
|
return 'ic_lock_alt';
|
|
57
|
+
case 'outline':
|
|
58
|
+
return null;
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
61
|
|