add missing methods section to ArgsTable rendering in Docs addon

This commit is contained in:
Shackles 2020-09-08 12:04:15 +02:00
parent 21982e7983
commit 24c4167332
2 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,7 @@ interface Tag {
attributes?: TagItem[];
properties?: TagItem[];
events?: TagItem[];
methods?: TagItem[];
slots?: TagItem[];
cssProperties?: TagItem[];
}
@ -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'),
}

View File

@ -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": "",