Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon-docs: Add Methods to web components ArgsTable #12413

Merged
merged 1 commit into from Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions addons/docs/src/frameworks/web-components/custom-elements.ts
Expand Up @@ -17,6 +17,7 @@ interface Tag {
attributes?: TagItem[];
properties?: TagItem[];
events?: TagItem[];
methods?: TagItem[];
slots?: TagItem[];
cssProperties?: TagItem[];
}
Expand Down Expand Up @@ -74,6 +75,7 @@ export const extractArgTypesFromElements = (tagName: string, customElements: Cus
...mapData(metaData.attributes, 'attributes'),
...mapData(metaData.properties, 'properties'),
...mapData(metaData.events, 'events'),
...mapData(metaData.methods, 'methods'),
...mapData(metaData.slots, 'slots'),
...mapData(metaData.cssProperties, 'css'),
}
Expand Down
6 changes: 6 additions & 0 deletions examples/web-components-kitchen-sink/custom-elements.json
Expand Up @@ -46,6 +46,12 @@
"description": "Fires whenever it switches between front/back"
}
],
"methods": [
{
"name": "testMethod",
"description": "Some web component frameworks like Stencil generate extra docs for methods. These are also displayed in the ArgsTable."
}
],
"slots": [
{
"name": "",
Expand Down