File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -68,12 +68,41 @@ Add the component to the `src/lib/index.ts` file:
6868export { default as MyComponent } from ' ./components/my-component.svelte'
6969```
7070
71- Import the component locally into the ` index .md` file:
71+ Import the component locally into the ` src/routes/+page .md` file:
7272
7373``` svelte
74- import MyComponent from '$lib/components/my-component.svelte '
74+ import { MyComponent } from '$lib'
7575```
7676
77+ After importing the component, add it to the
78+ ` Available Components List ` and document it:
79+
80+ ``` markdown
81+ ## Available Components List
82+
83+ - [MyComponent](#mycomponent)
84+ ```
85+
86+ ```` markdown
87+ ## MyComponent
88+
89+ Props:
90+
91+ ```ts
92+ myComponentId: string = ''
93+ ```
94+
95+ Usage:
96+
97+ ```html
98+ <MyComponent myComponentId="..." />
99+ ```
100+
101+ Output:
102+
103+ <MyComponent myComponentId="..." />
104+ ````
105+
77106Test the package locally with the ` package:local ` script:
78107
79108``` bash
You can’t perform that action at this time.
0 commit comments