chore: update readme

This commit is contained in:
Ayo Ayco 2023-07-16 12:52:04 +02:00
parent 658a15c275
commit 197aa06b66

View file

@ -15,22 +15,19 @@ npm i @ayco/astro-resume
```astro ```astro
--- ---
import Resumable from '@ayco/astro-resume'; import Resumable from "@ayco/astro-resume";
const data = { const data = {
hello: 'world' hello: 'world'
} }
--- ---
<Resumable id="astro-obj" data={data} /> <Resumable id="astro-obj" data={data} />
<div id="render-here"></div>
<script> <script>
import {resume} from '@ayco/astro-resume'; import {resume} from '@ayco/astro-resume';
console.log(resume('astro-obj')); console.log(
const renderDiv = document.querySelector('#render-here'); resume('astro-obj')
if (renderDiv) { )
renderDiv.innerHTML = JSON.stringify(resume('astro-obj'))
}
</script> </script>
``` ```