Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
foundation!: MDCDialogFoundation;
dialogElement: React.RefObject = React.createRef();
labelledBy?: string;
describedBy?: string;
static defaultProps: Partial> = {
autoStackButtons: true,
className: '',
onOpening: () => {},
onClosing: () => {},
tag: 'div',
id: 'mdc-dialog',
open: false,
role: 'alertdialog',
escapeKeyAction: strings.CLOSE_ACTION,
scrimClickAction: strings.CLOSE_ACTION,
};
state: DialogState = {classList: new Set()};
componentDidMount() {
const {open, autoStackButtons, escapeKeyAction, scrimClickAction} = this.props;
this.foundation = new MDCDialogFoundation(this.adapter);
this.foundation.init();
if (open) {
this.open();
}
if (!autoStackButtons) {
this.foundation.setAutoStackButtons(autoStackButtons!);
}
focusTrap?: FocusTrap;
foundation!: MDCDialogFoundation;
dialogElement: React.RefObject = React.createRef();
labelledBy?: string;
describedBy?: string;
static defaultProps: Partial> = {
autoStackButtons: true,
className: '',
onOpening: () => {},
onClosing: () => {},
tag: 'div',
id: 'mdc-dialog',
open: false,
role: 'alertdialog',
escapeKeyAction: strings.CLOSE_ACTION,
scrimClickAction: strings.CLOSE_ACTION,
};
state: DialogState = {classList: new Set()};
componentDidMount() {
const {open, autoStackButtons, escapeKeyAction, scrimClickAction} = this.props;
this.foundation = new MDCDialogFoundation(this.adapter);
this.foundation.init();
if (open) {
this.open();
}
if (!autoStackButtons) {
this.foundation.setAutoStackButtons(autoStackButtons!);
}