-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from CarmineOptions/feature/price-protect-vid…
…eo-popup feat: add price protect video popup
- Loading branch information
Showing
6 changed files
with
100 additions
and
1 deletion.
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 @@ | ||
export const Popup = () => {}; |
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,27 @@ | ||
export type PopupConfig = { | ||
url: string; | ||
width?: number; | ||
height?: number; | ||
left?: number; | ||
top?: number; | ||
}; | ||
|
||
export const openPopupWindow = (config: PopupConfig) => { | ||
if (!window) { | ||
return; | ||
} | ||
|
||
const { url, width, height, left, top } = { | ||
width: 987, | ||
height: 555, | ||
left: 0, | ||
top: 0, | ||
...config, | ||
}; | ||
|
||
window.open( | ||
url, | ||
"popupWindow", // Window name | ||
`width=${width},height=${height},top=${top},left=${left},resizable,scrollbars` | ||
); | ||
}; |
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,14 @@ | ||
const PriceProtectVideoPage = () => ( | ||
<iframe | ||
src="https://drive.google.com/file/d/1M7ROxzZ-d9XhePYe-15j0T--UGdoiYPi/preview" | ||
style={{ | ||
border: "none", | ||
}} | ||
width="987" | ||
height="555" | ||
allow="autoplay" | ||
title="CarmineOptions Price Protect" | ||
></iframe> | ||
); | ||
|
||
export default PriceProtectVideoPage; |