Commit 628e591c authored by Damien Mariotto's avatar Damien Mariotto
Browse files

[Modal] Fix proptypes display in doc

parent 71d2714e
Pipeline #1637 passed with stage
in 55 seconds
......@@ -105,39 +105,43 @@ function Modal({
childProps.onExited = handleExited;
}
return ReactDOM.createPortal(
<div
className={classNames(classes.root)}
onClick={handleBackdropClick}
ref={node}
>
{!disableOverlay && (
<Overlay className={classNames({ [classes.hidden]: exited })} />
)}
{typeof props.children === 'string' ? (
<div
className={classNames(className, classes.content, {
[classes.hidden]: exited
})}
onClick={handleClickInside}
>
{props.children}
</div>
) : (
return (
<>
{ReactDOM.createPortal(
<div
className={classNames(className, classes.content, {
[classes.hidden]: exited
})}
onClick={handleClickInside}
className={classNames(classes.root)}
onClick={handleBackdropClick}
ref={node}
>
{props.children &&
React.Children.map(props.children, child =>
React.cloneElement(child, childProps)
)}
</div>
{!disableOverlay && (
<Overlay className={classNames({ [classes.hidden]: exited })} />
)}
{typeof props.children === 'string' ? (
<div
className={classNames(className, classes.content, {
[classes.hidden]: exited
})}
onClick={handleClickInside}
>
{props.children}
</div>
) : (
<div
className={classNames(className, classes.content, {
[classes.hidden]: exited
})}
onClick={handleClickInside}
>
{props.children &&
React.Children.map(props.children, child =>
React.cloneElement(child, childProps)
)}
</div>
)}
</div>,
modalRoot
)}
</div>,
modalRoot
</>
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment