Skip to content

Commit

Permalink
chore: make example renderer client only
Browse files Browse the repository at this point in the history
  • Loading branch information
ChronicStone committed Apr 28, 2024
1 parent 418e7ff commit d2bde21
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,20 @@ footer:
import ExampleRenderer from './.vitepress/theme/components/ExampleRenderer.vue'
</script>

<ExampleRenderer fileKey="financial-report">
<template v-slot:schema>
```ts twoslash
import { ExcelSchemaBuilder } from '@chronicstone/typed-xlsx'
// ---cut-before---
const schema = ExcelSchemaBuilder.create<{ firstName: string, lastName: string, countries: string[] }>()
```
</template>
<template v-slot:data>
<<< ./.examples/financial-report/data.ts
</template>
<template v-slot:file>
<<< ./.examples/financial-report/file.ts
</template>
</ExampleRenderer>
<ClientOnly>
<ExampleRenderer fileKey="financial-report">
<template v-slot:schema>
```ts twoslash
import { ExcelSchemaBuilder } from '@chronicstone/typed-xlsx'
// ---cut-before---
const schema = ExcelSchemaBuilder.create<{ firstName: string, lastName: string, countries: string[] }>()
```
</template>
<template v-slot:data>
<<< ./.examples/financial-report/data.ts
</template>
<template v-slot:file>
<<< ./.examples/financial-report/file.ts
</template>
</ExampleRenderer>
</ClientOnly>

0 comments on commit d2bde21

Please sign in to comment.