Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
style={style} // style comes from Transition
>
{children}
,
attachTo
)
: null;
}
}
export default withModalHandlers(Popout, { transition: springDown });
useKeydownHandler(event => {
if (onKeyDown && stackIndex === 0) {
onKeyDown(event);
}
});
const dialogTitleId = useMemo(generateUEID, []);
if (!attachTo) {
return null;
}
return createPortal(
{isOpen ? (
) : null}
render() {
const { attachTo, children, component, width, transitionState } = this.props;
if (!attachTo) {
return null;
}
return createPortal(
<dialog width="{width}">
{children}
</dialog>
,
attachTo
);
}
}
{transitionState => (
{content}
)}
heading,
initialFocus,
onClose,
width,
transitionState,
} = this.props;
const dialogTitleId = generateUEID();
if (!attachTo) {
return null;
}
return createPortal(
<dialog aria-labelledby="{dialogTitleId}">
{heading} Dialog
{heading ? (
<header>
<title>{heading}</title>
</header></dialog>
,
attachTo
);
}
ModalDialogComponent.defaultProps = {
attachTo: typeof document !== 'undefined' ? document.body : null,
closeOnBlanketClick: false,
component: 'div',
width: 640,
};
const ModalDialog = memo(ModalDialogComponent);
export default withTransitionState(ModalDialog);
<title>{heading}</title>
) : null}
{children}
{footer ? <footer>{footer}</footer> : null}
,
attachTo
);
}
}
export default withTransitionState(ModalDialog);
<dialog width="{width}">
{children}
</dialog>
,
attachTo
);
}
}
export default withTransitionState(ModalConfirm);
>
{content}
);
})}
,
attachTo
);
} else {
return null;
}
}
}
export default withModalHandlers(Dropdown, { transition: slideDown });
render() {
const {
attachTo,
children,
closeOnBlanketClick,
component,
footer,
heading,
initialFocus,
onClose,
width,
transitionState,
} = this.props;
const dialogTitleId = generateUEID();
if (!attachTo) {
return null;
}
return createPortal(