Skip to content

Commit

Permalink
feat(modal): use portals
Browse files Browse the repository at this point in the history
render modal at top-level in dom via
a portal instead of inside parent
component

BREAKING CHANGE: Modal now renders through a Portal, this may cause failures in tests or styling rules that expect the modal in specific places in the dom tree
  • Loading branch information
Mjloturco committed Apr 27, 2018
1 parent ae9dd7e commit 645ceb4
Show file tree
Hide file tree
Showing 6 changed files with 213 additions and 778 deletions.
5 changes: 4 additions & 1 deletion .storybook/Storyshots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ jest.mock("react-dom", () => {
render: () => null,
unmountComponentAtNode: () => null,
findDOMNode: () => null,
createPortal: () => null,
};
});

initStoryshots();
initStoryshots({
storyKindRegex: /^((?!.*?Modal).)*$/,
});
Loading

0 comments on commit 645ceb4

Please sign in to comment.