This library is an experimental state. It would be changed rapidly.
svetle-notion-page
is component who render page using a notion. see example.
npm install -D svelte-notion-page
<script lang="ts">
import { defaultComponents, NotionComponentProvider, NotionPage } from 'svelte-notion-page';
import { json } from './post';
import { setContext } from 'svelte';
import { PROVIDER_KEY } from 'svelte-notion-page/context';
import Test from './Test.svelte';
const provider = new NotionComponentProvider({
...defaultComponents,
paragraph: Test
});
setContext(PROVIDER_KEY, provider);
</script>
<NotionPage content={json}/>