docs: add component comments (#7376)

* docs: add component comments

* Review: copy on IDE

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Review: conventions/brevity

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
pull/15965/head
Eric Liu 9 months ago committed by GitHub
parent bf84b5bf25
commit 6045028666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -138,3 +138,12 @@ Comments beginning with `svelte-ignore` disable warnings for the next block of m
<!-- svelte-ignore a11y-autofocus -->
<input bind:value={name} autofocus />
```
You can document components with the `@component` tag. These comments will appear when hovering over a component in IDEs with support such as VS Code with [the Svelte VS Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
```svelte
<!--
@component this is a component description
-->
<h1>Hello world</h1>
```

Loading…
Cancel
Save