@abgov/react-components 3.4.0-alpha.31 → 3.4.0-alpha.32
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/lib/modal/modal.d.ts +8 -6
- package/package.json +1 -1
- package/react-components.esm.js +11 -5
- package/react-components.umd.js +11 -5
package/lib/modal/modal.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
interface WCProps {
|
|
3
3
|
ref: React.RefObject<HTMLElement>;
|
|
4
|
-
title
|
|
5
|
-
closable: boolean;
|
|
6
|
-
scrollable: boolean;
|
|
4
|
+
title?: string;
|
|
7
5
|
open?: boolean;
|
|
6
|
+
width?: string;
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
scrollable?: boolean;
|
|
8
9
|
}
|
|
9
10
|
declare global {
|
|
10
11
|
namespace JSX {
|
|
@@ -14,10 +15,11 @@ declare global {
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
interface Props {
|
|
17
|
-
title
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
title?: string;
|
|
19
|
+
width?: string;
|
|
20
|
+
actions?: React.ReactElement;
|
|
20
21
|
onClose?: () => void;
|
|
22
|
+
open?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export declare const GoAModal: FC<Props>;
|
|
23
25
|
export default GoAModal;
|
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -575,7 +575,8 @@ const GoAModal = ({
|
|
|
575
575
|
title,
|
|
576
576
|
children,
|
|
577
577
|
open,
|
|
578
|
-
|
|
578
|
+
width,
|
|
579
|
+
actions,
|
|
579
580
|
onClose
|
|
580
581
|
}) => {
|
|
581
582
|
const el = useRef(null);
|
|
@@ -595,14 +596,19 @@ const GoAModal = ({
|
|
|
595
596
|
current.removeEventListener('_close', listener);
|
|
596
597
|
};
|
|
597
598
|
}, [el, onClose]);
|
|
598
|
-
return
|
|
599
|
+
return jsxs("goa-modal", Object.assign({
|
|
599
600
|
ref: el,
|
|
600
601
|
title: title,
|
|
601
602
|
open: open,
|
|
602
|
-
closable:
|
|
603
|
-
scrollable: true
|
|
603
|
+
closable: !!onClose,
|
|
604
|
+
scrollable: true,
|
|
605
|
+
width: width
|
|
604
606
|
}, {
|
|
605
|
-
children:
|
|
607
|
+
children: [actions && jsx("div", Object.assign({
|
|
608
|
+
slot: "actions"
|
|
609
|
+
}, {
|
|
610
|
+
children: actions
|
|
611
|
+
}), void 0), children]
|
|
606
612
|
}), void 0);
|
|
607
613
|
};
|
|
608
614
|
|
package/react-components.umd.js
CHANGED
|
@@ -586,7 +586,8 @@
|
|
|
586
586
|
var title = _a.title,
|
|
587
587
|
children = _a.children,
|
|
588
588
|
open = _a.open,
|
|
589
|
-
|
|
589
|
+
width = _a.width,
|
|
590
|
+
actions = _a.actions,
|
|
590
591
|
onClose = _a.onClose;
|
|
591
592
|
var el = React.useRef(null);
|
|
592
593
|
React.useEffect(function () {
|
|
@@ -605,14 +606,19 @@
|
|
|
605
606
|
current.removeEventListener('_close', listener);
|
|
606
607
|
};
|
|
607
608
|
}, [el, onClose]);
|
|
608
|
-
return jsxRuntime.
|
|
609
|
+
return jsxRuntime.jsxs("goa-modal", __assign({
|
|
609
610
|
ref: el,
|
|
610
611
|
title: title,
|
|
611
612
|
open: open,
|
|
612
|
-
closable:
|
|
613
|
-
scrollable: true
|
|
613
|
+
closable: !!onClose,
|
|
614
|
+
scrollable: true,
|
|
615
|
+
width: width
|
|
614
616
|
}, {
|
|
615
|
-
children:
|
|
617
|
+
children: [actions && jsxRuntime.jsx("div", __assign({
|
|
618
|
+
slot: "actions"
|
|
619
|
+
}, {
|
|
620
|
+
children: actions
|
|
621
|
+
}), void 0), children]
|
|
616
622
|
}), void 0);
|
|
617
623
|
};
|
|
618
624
|
|