-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(vue): add a Vue example file (#77)
Web types are not only useful for HTML files in IntelliJ IDEs, but Vue files as well. This commit adds an example Vue file that mirrors the HTML example file (`example/src/example.vue`). This new Vue file is _not_ wired up to any development server/project. Folks wishing to "test it out" are asked to open the file in an IntelliJ IDE, as that's where the functionality of this project can be seen. Misc. updates/rewordings are also included in this commit that I came across while updating the documentation
- Loading branch information
1 parent
baca5ab
commit 1fbe196
Showing
4 changed files
with
57 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!-- Note: This Vue file is not wired up to any webserver. It is solely for demonstration purposes in the IDE --> | ||
|
||
<!-- For any of the components in this file, right-clicking on the tag name->"Go To"->"Declaration or Usages" will --> | ||
<!-- take you to the component's class definition file. --> | ||
|
||
<template> | ||
<!-- After setup, hover over the component name and each of the props --> | ||
<!-- | ||
- my-component will have its description pulled from its JSDoc | ||
- first will have its description pulled from its JSDoc. Its required status will be reported (hint: try removing it and see what the IDE does). | ||
- middle will have its description pulled from its JSDoc. Its default value will be reported. | ||
- last will have its description pulled from its JSDoc. | ||
- suffix will have its description pulled from its JSDoc. It will be reported as deprecated. | ||
--> | ||
<h2>Prop Example (<my-component>)</h2> | ||
<my-component first="Stencil" middle=" " last="'Don't call me a framework'" suffix="JS"></my-component> | ||
|
||
<br /> | ||
|
||
<!-- After setup, hover over the slot names - each of the slot's descriptions will be shown by intellisense --> | ||
<!-- Also try deleting one of the slot attributes, notice how intellisense suggests the slot names for you! --> | ||
<h2>Slot Example (<slot-example>)</h2> | ||
<slot-example> | ||
<div>Main content</div> | ||
<div slot="primary">Primary Content</div> | ||
<div slot="secondary">Secondary Content</div> | ||
</slot-example> | ||
|
||
<br /> | ||
|
||
<!-- Demonstrates how shadow parts work. See the style tag below for more information. --> | ||
<h2>CSS Shadow Part Example (<shadow-parts>)</h2> | ||
<shadow-parts></shadow-parts> | ||
</template> | ||
|
||
<!-- Corresponds to the shadow-parts element above. --> | ||
<!-- After setup, hover over the shadow part name to see its description. --> | ||
<!-- After setup, autocomplete for the shadow part names will also work. Try deleting 'first-msg' below and retyping it --> | ||
<style scoped> | ||
shadow-parts::part(first-msg) { | ||
background: aqua; | ||
} | ||
shadow-parts::part(second-msg) { | ||
background: lightgreen; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters