Skip to content

Commit

Permalink
Fonts issue fix (#1846)
Browse files Browse the repository at this point in the history
Signed-off-by: Daria Terekhova <daria.terekhova@actionengine.com>
  • Loading branch information
dariaterekhova-actionengine committed Jun 30, 2022
1 parent 9a3da3c commit 9feddc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/common/modal.tsx
Expand Up @@ -140,7 +140,7 @@ export const ModalFooter = ({cancel, confirm, cancelButton, confirmButton}) => {
);
};

export interface ModalDialogProps {
interface ModalDialogOwnProps {
footer: boolean;
close: boolean;
isOpen: boolean;
Expand All @@ -158,6 +158,8 @@ export interface ModalDialogProps {
children?: ReactNode;
}

export type ModalDialogProps = ModalDialogOwnProps & Omit<ReactModal.Props, "style" | "ariaHideApp" | "className">

export class ModalDialog extends Component<ModalDialogProps> {
static defaultProps = {
footer: false,
Expand Down
5 changes: 4 additions & 1 deletion src/components/modal-container.tsx
Expand Up @@ -70,6 +70,7 @@ import * as MapStyleActions from 'actions/map-style-actions';
import * as ProviderActions from 'actions/provider-actions';
import {ModalDialogProps} from './common/modal';
import {Provider} from 'cloud-providers';
import {findDOMNode} from 'react-dom';

const DataTableModalStyle = css`
top: 80px;
Expand Down Expand Up @@ -274,6 +275,7 @@ export default function ModalContainerFactory(
mapState,
uiState,
visState,
rootNode,
visStateActions,
uiStateActions,
providerState
Expand Down Expand Up @@ -540,8 +542,9 @@ export default function ModalContainerFactory(
}
}

return this.props.rootNode ? (
return rootNode ? (
<ModalDialog
parentSelector={() => findDOMNode(rootNode) as HTMLElement}
isOpen={Boolean(currentModal)}
onCancel={this._closeModal}
{...modalProps}
Expand Down

0 comments on commit 9feddc6

Please sign in to comment.