Web: Component: Added modal dialog height property.
This commit is contained in:
parent
783eb2295b
commit
a4e21a2319
@ -2,7 +2,7 @@ import React from "react";
|
||||
import Loaders from "../../Loaders";
|
||||
import StyledDialogLoader from "./StyledDialogLoader";
|
||||
|
||||
const DialogLoader = () => {
|
||||
const DialogLoader = ({ bodyHeight = "150px" }) => {
|
||||
return (
|
||||
<StyledDialogLoader>
|
||||
<div className="dialog-loader-header">
|
||||
@ -14,7 +14,7 @@ const DialogLoader = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="dialog-loader-body">
|
||||
<Loaders.Rectangle height="150px" />
|
||||
<Loaders.Rectangle height={bodyHeight} />
|
||||
</div>
|
||||
|
||||
<div className="dialog-loader-footer">
|
||||
|
@ -110,6 +110,7 @@ class ModalDialog extends React.Component {
|
||||
isLoading,
|
||||
contentPaddingBottom,
|
||||
removeScroll,
|
||||
modalDialogHeight,
|
||||
} = this.props;
|
||||
|
||||
let header = null;
|
||||
@ -150,7 +151,7 @@ class ModalDialog extends React.Component {
|
||||
>
|
||||
<Content contentHeight={contentHeight} contentWidth={contentWidth}>
|
||||
{isLoading ? (
|
||||
<Loaders.DialogLoader />
|
||||
<Loaders.DialogLoader bodyHeight={modalDialogHeight} />
|
||||
) : (
|
||||
<>
|
||||
<StyledHeader>
|
||||
@ -246,6 +247,7 @@ ModalDialog.propTypes = {
|
||||
id: PropTypes.string,
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
||||
contentPaddingBottom: PropTypes.string,
|
||||
modalDialogHeight: PropTypes.string,
|
||||
};
|
||||
|
||||
ModalDialog.defaultProps = {
|
||||
|
Loading…
Reference in New Issue
Block a user