blue-react 8.6.4 → 8.7.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/dist/components/Layout.js +11 -1
- package/dist/components/Modal.js +5 -2
- package/dist/components/ModalProvider.js +18 -9
- package/dist/components/Utilities.js +13 -1
- package/dist/style.css +2 -2
- package/dist/style.min.css +2 -2
- package/dist/style.scss +1 -1
- package/dist/types/components/Layout.d.ts +9 -1
- package/dist/types/components/Modal.d.ts +3 -2
- package/dist/types/components/ModalProvider.d.ts +3 -3
- package/package.json +1 -1
package/dist/style.scss
CHANGED
|
@@ -7,7 +7,15 @@ declare global {
|
|
|
7
7
|
}
|
|
8
8
|
export interface LayoutProps {
|
|
9
9
|
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* By default, the side bar is "in".
|
|
12
|
+
* You can control the state from outside, by also using `onChangeSidebarIn`.
|
|
13
|
+
*/
|
|
10
14
|
sidebarIn?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* React to changes of the `sidebarIn` state.
|
|
17
|
+
*/
|
|
18
|
+
onChangeSidebarIn?: (sidebarIn: boolean) => void;
|
|
11
19
|
style?: CSSProperties;
|
|
12
20
|
/**
|
|
13
21
|
* Sidebar is automatically expanded on wider views.
|
|
@@ -62,7 +70,7 @@ export interface LayoutProps {
|
|
|
62
70
|
children?: any;
|
|
63
71
|
}
|
|
64
72
|
export interface LayoutState {
|
|
65
|
-
sidebarIn
|
|
73
|
+
sidebarIn: boolean;
|
|
66
74
|
match: any;
|
|
67
75
|
history: string[];
|
|
68
76
|
hash: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
import { ModalType } from "./shared";
|
|
3
3
|
export interface ModalProps {
|
|
4
4
|
modalContent?: string;
|
|
5
5
|
modalTitle?: string;
|
|
6
|
+
modalIcon?: ReactNode;
|
|
6
7
|
unSetModalContent: (modalContent?: string) => void;
|
|
7
8
|
/**
|
|
8
9
|
* Type of `input` depends on `type` prop and which action occured.
|
|
@@ -22,4 +23,4 @@ export interface ModalProps {
|
|
|
22
23
|
*
|
|
23
24
|
* For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
|
|
24
25
|
*/
|
|
25
|
-
export default function Modal({ modalContent, modalTitle, unSetModalContent, onSubmit, defaultInput, type }: ModalProps): JSX.Element;
|
|
26
|
+
export default function Modal({ modalContent, modalTitle, modalIcon, unSetModalContent, onSubmit, defaultInput, type }: ModalProps): JSX.Element;
|
|
@@ -4,8 +4,8 @@ export interface ModalProviderProps {
|
|
|
4
4
|
}
|
|
5
5
|
declare const ModalProvider: ({ children, ...rest }: ModalProviderProps) => JSX.Element;
|
|
6
6
|
declare const useModal: () => {
|
|
7
|
-
ask: (text: string, title?: string) => Promise<string | boolean>;
|
|
8
|
-
tell: (text: string, title?: string) => Promise<boolean>;
|
|
9
|
-
verify: (text: string, title?: string) => Promise<boolean>;
|
|
7
|
+
ask: (text: string, title?: string, icon?: ReactNode) => Promise<string | boolean>;
|
|
8
|
+
tell: (text: string, title?: string, icon?: ReactNode) => Promise<boolean>;
|
|
9
|
+
verify: (text: string, title?: string, icon?: ReactNode) => Promise<boolean>;
|
|
10
10
|
};
|
|
11
11
|
export { ModalProvider, useModal };
|