Skip to content

Commit 5646183

Browse files
authored
Merge pull request #430 from joaopalmeiro/fix/md-file-readme
2 parents fb93e18 + 3803b65 commit 5646183

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,41 @@ Add the component to the `src/lib/index.ts` file:
6868
export { 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+
77106
Test the package locally with the `package:local` script:
78107

79108
```bash

0 commit comments

Comments
 (0)