From f9b8e15aaaea4bd94516d8c15231f69207205d57 Mon Sep 17 00:00:00 2001 From: Erin Doyle Date: Sun, 19 Aug 2018 19:50:52 -0400 Subject: [PATCH] Replaced Modal with use of react-modal, an already accessible Modal component from reactjs. --- package.json | 1 + public/app.css | 17 +++++++++-- public/index.html | 1 - src/primitives/Modal.js | 40 -------------------------- src/wishlist/MovieEditor.js | 53 ++++++++++++++++++++++------------- src/wishlist/MovieWishlist.js | 9 +++--- yarn.lock | 17 +++++++++++ 7 files changed, 71 insertions(+), 67 deletions(-) delete mode 100644 src/primitives/Modal.js diff --git a/package.json b/package.json index b28f5ba..8bda866 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "prop-types": "^15.6.2", "react": "^16.4.2", "react-dom": "^16.4.2", + "react-modal": "^3.5.1", "react-router-dom": "^4.3.1", "react-scripts": "1.1.4" }, diff --git a/public/app.css b/public/app.css index 3049888..ce1578d 100644 --- a/public/app.css +++ b/public/app.css @@ -70,6 +70,19 @@ a { color: #3951b1; } -.modal.show { - display: inherit; +.dialog-modal { + position: absolute; + top: 40px; + left: 40px; + right: 40px; + bottom: 40px; +} + +.modal-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(77, 77, 77, 0.9); } \ No newline at end of file diff --git a/public/index.html b/public/index.html index d679b2c..06a8b2e 100644 --- a/public/index.html +++ b/public/index.html @@ -31,7 +31,6 @@ You need to enable JavaScript to run this app.
-