Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Dialog: default modal props now respective (Modal rendered with light background.)",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "dzearing@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,30 @@ import {
getId
} from '../../Utilities';
import { IDialogProps } from './Dialog.types';
import { DialogType } from './DialogContent.types';
import { Modal } from '../../Modal';
import { DialogType, IDialogContentProps } from './DialogContent.types';
import { Modal, IModalProps } from '../../Modal';
import { withResponsiveMode } from '../../utilities/decorators/withResponsiveMode';
import * as stylesImport from './Dialog.scss';
const styles: any = stylesImport;

import { DialogContent } from './DialogContent';

const DefaultModalProps: IModalProps = {
isDarkOverlay: false,
isBlocking: false,
className: '',
containerClassName: ''
};

const DefaultDialogContentProps: IDialogContentProps = {
type: DialogType.normal,
className: '',
topButtonsProps: [],
};

@withResponsiveMode
export class DialogBase extends BaseComponent<IDialogProps, {}> {
public static defaultProps: IDialogProps = {
modalProps: {
isDarkOverlay: true,
isBlocking: false,
className: '',
containerClassName: ''
},
dialogContentProps: {
type: DialogType.normal,
className: '',
topButtonsProps: [],
},
hidden: true,
};

Expand Down Expand Up @@ -78,12 +80,20 @@ export class DialogBase extends BaseComponent<IDialogProps, {}> {
type,
contentClassName,
topButtonsProps,
dialogContentProps,
modalProps,
containerClassName,
hidden
} = this.props;

const modalProps = {
...DefaultModalProps,
...this.props.modalProps
};

const dialogContentProps: IDialogContentProps = {
...DefaultDialogContentProps,
...this.props.dialogContentProps
};

return (
<Modal
elementToFocusOnDismiss={ elementToFocusOnDismiss }
Expand Down