@@ -17,16 +17,20 @@ Renders the JSON response of the official Notion API as React components. Stylin
17
17
18
18
Checkout the [ Demo] ( https://xennis.github.io/react-notion-render/ ) .
19
19
20
- ## Installation
20
+ ## Packages
21
+
22
+ | Package dir | NPM version | Size |
23
+ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | ` fetch ` | [ ![ NPM version] ( https://img.shields.io/npm/v/@xennis/react-notion-cms-fetch.svg )] ( https://www.npmjs.com/package/@xennis/react-notion-cms-fetch ) | [ ![ NPM bundle size] ( https://img.shields.io/bundlephobia/minzip/@xennis/react-notion-cms-fetch.svg )] ( https://bundlephobia.com/package/@xennis/react-notion-cms-fetch ) |
25
+ | ` render ` | [ ![ NPM version] ( https://img.shields.io/npm/v/@xennis/react-notion-cms-render.svg )] ( https://www.npmjs.com/package/@xennis/react-notion-cms-render ) | [ ![ NPM bundle size] ( https://img.shields.io/bundlephobia/minzip/@xennis/react-notion-cms-render.svg )] ( https://bundlephobia.com/package/@xennis/react-notion-cms-render ) |
21
26
22
- The package is not released yet. Still you can use for example [ GitPkg] ( https://gitpkg.vercel.app/ ) to install it
23
- (Hint: To pin the version replace ` main ` by a commit hash)
27
+ ## Installation
24
28
25
29
``` shell
26
30
# Add the render package
27
- npm install ' https://gitpkg.now.sh/Xennis/ react-notion-render/packages/render?main&scripts.install=pnpm%20build '
31
+ npm install @xennis/ react-notion-cms- render
28
32
# (Optional) Add the fetch package
29
- npm install ' https://gitpkg.now.sh/Xennis/ react-notion-render/packages/ fetch?main&scripts.install=pnpm%20build '
33
+ npm install @xennis/ react-notion-cms- fetch
30
34
```
31
35
32
36
Next, add the package to you Tailwind CSS config:
@@ -38,7 +42,7 @@ const config: Config = {
38
42
content: [
39
43
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
40
44
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
41
- + "./node_modules/@react-notion-cms/ render/**/*.{js,jsx}",
45
+ + "./node_modules/@xennis/ react-notion-cms- render/**/*.{js,jsx}",
42
46
],
43
47
}
44
48
export default config
@@ -48,8 +52,8 @@ export default config
48
52
49
53
``` tsx
50
54
import { Client } from " @notionhq/client"
51
- import { fetchBlocksChildren , Render } from " @react-notion-cms/ render"
52
- import " @react-notion-cms/ render/dist/styles.css"
55
+ import { fetchBlocksChildren , Render } from " @xennis/ react-notion-cms- render"
56
+ import " @xennis/ react-notion-cms- render/dist/styles.css"
53
57
54
58
const client = new Client ({ auth: " <NOTION AUTH TOKEN>" })
55
59
0 commit comments