aio-card 2.0.1 → 2.0.2
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/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -83,7 +83,7 @@ const Provider = ({ value, children }) => {
|
|
|
83
83
|
};
|
|
84
84
|
const useProvider = () => useContext(Context);
|
|
85
85
|
export const Card = (props) => {
|
|
86
|
-
const { text, footer, header, layoutAttrs, showFooter, show = true, placeholder, popoverActions, errorMessage, label, required, footerAttrs, showCard = true } = props;
|
|
86
|
+
const { text, footer, header, layoutAttrs, showFooter, show = true, placeholder, popoverActions, errorMessage, label, required, footerAttrs, showCard = true, popover } = props;
|
|
87
87
|
const mainRef = useRef(null);
|
|
88
88
|
const popup = usePopup();
|
|
89
89
|
const cardClass = CardClass(mainRef, popup);
|
|
@@ -96,7 +96,7 @@ export const Card = (props) => {
|
|
|
96
96
|
popoverActions.isOpen = () => !!popup.getModals().length;
|
|
97
97
|
}
|
|
98
98
|
const { beforeNodes, afterNodes } = cardClass.getSideNodes(props);
|
|
99
|
-
const card = !showCard ? null : (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({}, cardClass.getCardAttrs(props), { children: [_jsx(CardBefore, { befores: beforeNodes }), _jsx(CardText, { text: text, placeholder: placeholder, justify: props.justify }), _jsx(CardAfter, { afters: afterNodes })] })), popup.render()] }));
|
|
99
|
+
const card = !showCard ? null : (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({}, cardClass.getCardAttrs(props), { children: [_jsx(CardBefore, { befores: beforeNodes }), _jsx(CardText, { text: text, placeholder: placeholder, justify: props.justify }), _jsx(CardAfter, { afters: afterNodes })] })), !(popover === null || popover === void 0 ? void 0 : popover.portal) && popup.render(), !!(popover === null || popover === void 0 ? void 0 : popover.portal) && popup.portal()] }));
|
|
100
100
|
let result = card;
|
|
101
101
|
if (errorMessage || label || header || footer || layoutAttrs) {
|
|
102
102
|
const attrs = AddToAttrs(layoutAttrs, { className: ["aio-card-layout"] });
|