-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
700d58c
commit e0631a2
Showing
8 changed files
with
114 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(library | ||
(name shared_js) | ||
(public_name universal-portal.modal.js) | ||
(modes melange) | ||
(wrapped false) | ||
(libraries universal-portal.shared_js reason-react melange-webapi) | ||
(preprocess | ||
(pps melange.ppx reason-react-ppx server-reason-react.browser_ppx -js))) | ||
|
||
(copy_files# "../native/*.re") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[@react.component] | ||
let make = () => { | ||
<UniversalPortal_Shared.Portal selector="body"> | ||
<div | ||
style={ReactDOM.Style.make( | ||
~position="absolute", | ||
~top="0", | ||
~left="0", | ||
~width="100%", | ||
~backgroundColor="rgba(0, 0, 0, 0.3)", | ||
~height="100%", | ||
~display="flex", | ||
~justifyContent="center", | ||
~alignItems="center", | ||
(), | ||
)}> | ||
<div | ||
style={ReactDOM.Style.make( | ||
~backgroundColor="white", | ||
~padding="30px", | ||
~width="200px", | ||
~height="200px", | ||
(), | ||
)}> | ||
{"Hey, I'm a portal, disable JS on your dev tools and check that I'll still here" | ||
|> React.string} | ||
</div> | ||
</div> | ||
</UniversalPortal_Shared.Portal>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(library | ||
(name shared_native) | ||
(public_name universal-portal.modal.native) | ||
(modules :standard) | ||
(libraries | ||
universal-portal.shared_native | ||
server-reason-react.react | ||
server-reason-react.reactDom) | ||
(wrapped false) | ||
(preprocess | ||
(pps | ||
server-reason-react.ppx | ||
server-reason-react.browser_ppx | ||
server-reason-react.melange_ppx))) | ||
|
||
(copy_files# "../*.re") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters