-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Brian Vaughn
committed
Jul 18, 2024
1 parent
1db2abf
commit 0586271
Showing
6 changed files
with
49 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ node_modules | |
.cache | ||
.parcel-cache | ||
.pnp.* | ||
.yarn | ||
.yarn | ||
.vscode |
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
24 changes: 24 additions & 0 deletions
24
packages/react-resizable-panels-website/src/routes/iframe/index.tsx
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,24 @@ | ||
import { useState } from "react"; | ||
import styles from "./styles.module.css"; | ||
|
||
export default function Page() { | ||
const [url] = useState(() => { | ||
const url = new URL( | ||
typeof window !== undefined ? window.location.href : "" | ||
); | ||
|
||
return `${url.origin}/__e2e/?urlPanelGroup=${url.searchParams.get( | ||
"urlPanelGroup" | ||
)}`; | ||
}); | ||
|
||
return ( | ||
<div className={styles.Root}> | ||
<iframe | ||
className={styles.IFrame} | ||
sandbox="allow-scripts" | ||
src={url} | ||
></iframe> | ||
</div> | ||
); | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/react-resizable-panels-website/src/routes/iframe/styles.module.css
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 @@ | ||
.Root { | ||
width: 100vw; | ||
height: 100vh; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: var(--color-logo-background); | ||
} | ||
|
||
.IFrame { | ||
width: 400px; | ||
height: 200px; | ||
border: none; | ||
} |
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