feat: add a test app page
This commit is contained in:
parent
5657182a67
commit
c98d9ef6c8
2 changed files with 27 additions and 0 deletions
|
@ -1,7 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "@ayco/astro-resume",
|
"name": "@ayco/astro-resume",
|
||||||
|
"author": "Ayo Ayco",
|
||||||
|
"repository": "https://git.sr.ht/~ayoayco/astro-resume",
|
||||||
|
"homepage": "https://sr.ht/~ayoayco/astro-resume",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
"keywords": [
|
||||||
|
"astro-component",
|
||||||
|
"css",
|
||||||
|
"ui"
|
||||||
|
],
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.ts"
|
".": "./index.ts"
|
||||||
},
|
},
|
||||||
|
|
19
src/pages/index.astro
Normal file
19
src/pages/index.astro
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
import Resumable from '../Resumable.astro';
|
||||||
|
const data = {
|
||||||
|
hello: 'world'
|
||||||
|
}
|
||||||
|
---
|
||||||
|
|
||||||
|
<Resumable id="astro-obj" data={data} />
|
||||||
|
|
||||||
|
<div id="render-here"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import resume from '../resume';
|
||||||
|
console.log(resume('astro-obj'));
|
||||||
|
const renderDiv = document.querySelector('#render-here');
|
||||||
|
if (renderDiv) {
|
||||||
|
renderDiv.innerHTML = JSON.stringify(resume('astro-obj'))
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in a new issue