@bitrise/bitkit 9.28.0 → 9.28.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/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import Text from '../Text/Text';
|
|
|
14
14
|
type DialogState = {
|
|
15
15
|
isOpen: boolean;
|
|
16
16
|
onClose(): void;
|
|
17
|
-
onOpen(): void;
|
|
17
|
+
onOpen?(): void;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const useDialog = (): DialogState => {
|
|
@@ -27,17 +27,18 @@ export const useDialog = (): DialogState => {
|
|
|
27
27
|
};
|
|
28
28
|
export interface DialogProps {
|
|
29
29
|
children: ReactNode;
|
|
30
|
+
dataTestid?: string;
|
|
30
31
|
size?: 'small' | 'medium' | 'large';
|
|
31
32
|
state: DialogState;
|
|
32
33
|
title: string;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
const Dialog = ({ children, state, size, title }: DialogProps) => {
|
|
36
|
+
const Dialog = ({ children, dataTestid, state, size, title }: DialogProps) => {
|
|
36
37
|
const dialogSize = useBreakpointValue({ mobile: 'full', desktop: size });
|
|
37
38
|
return (
|
|
38
39
|
<Modal closeOnOverlayClick={false} isOpen={state.isOpen} onClose={state.onClose} size={dialogSize}>
|
|
39
40
|
<ModalOverlay />
|
|
40
|
-
<ModalContent>
|
|
41
|
+
<ModalContent data-testid={dataTestid}>
|
|
41
42
|
<ModalHeader>
|
|
42
43
|
<Text as="h1" size="5">
|
|
43
44
|
{title}
|