-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: setup stencil development environment with component preview (#…
…1196) * feat: turborepo setup * feat: setup stencil dev
- Loading branch information
1 parent
53af746
commit 458c3fa
Showing
3 changed files
with
88 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!DOCTYPE html> | ||
<html dir="ltr" lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
<title>SDK Install Modal Web</title> | ||
<script type="module" src="/build/sdk-install-modal-web.esm.js"></script> | ||
<script nomodule src="/build/sdk-install-modal-web.js"></script> | ||
<style> | ||
.nav { | ||
padding: 20px; | ||
background: #f5f5f5; | ||
margin-bottom: 20px; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
z-index: 100000; | ||
} | ||
.nav a { | ||
margin-right: 15px; | ||
color: #333; | ||
text-decoration: none; | ||
} | ||
.nav a:hover { | ||
text-decoration: underline; | ||
} | ||
.component-container { | ||
padding: 20px; | ||
margin-top: 60px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="nav"> | ||
<a href="#install">Install Modal</a> | ||
<a href="#pending">Pending Modal</a> | ||
<a href="#select">Select Modal</a> | ||
</div> | ||
|
||
<div class="component-container"> | ||
<div id="install" style="display: none"> | ||
<h2>Install Modal</h2> | ||
<mm-install-modal | ||
link="https://example.com/install" | ||
sdk-version="1.0.0" | ||
prefer-desktop="true" | ||
></mm-install-modal> | ||
</div> | ||
|
||
<div id="pending" style="display: none"> | ||
<h2>Pending Modal</h2> | ||
<mm-pending-modal></mm-pending-modal> | ||
</div> | ||
|
||
<div id="select" style="display: none"> | ||
<h2>Select Modal</h2> | ||
<mm-select-modal | ||
link="https://example.com/select" | ||
sdk-version="1.0.0" | ||
prefer-desktop="true" | ||
></mm-select-modal> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function showComponent() { | ||
const hash = window.location.hash || '#install'; | ||
document.querySelectorAll('.component-container > div').forEach(div => { | ||
div.style.display = 'none'; | ||
}); | ||
const componentDiv = document.querySelector(hash); | ||
if (componentDiv) { | ||
componentDiv.style.display = 'block'; | ||
} | ||
} | ||
|
||
window.addEventListener('hashchange', showComponent); | ||
showComponent(); | ||
</script> | ||
</body> | ||
</html> |
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