feat: add a test app page

This commit is contained in:
Ayo Ayco 2023-07-16 12:18:47 +02:00
parent 5657182a67
commit c98d9ef6c8
2 changed files with 27 additions and 0 deletions

View file

@ -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
View 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>