diff options
Diffstat (limited to 'src/content/dependencies/generateContentHeading.js')
-rw-r--r-- | src/content/dependencies/generateContentHeading.js | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/content/dependencies/generateContentHeading.js b/src/content/dependencies/generateContentHeading.js index baa52080..f5e4bd00 100644 --- a/src/content/dependencies/generateContentHeading.js +++ b/src/content/dependencies/generateContentHeading.js @@ -4,13 +4,23 @@ export default { ], generate({html}) { - return html.template(slot => - html.tag('p', - { - class: 'content-heading', - id: slot('id'), - tabindex: '0', - }, - slot('title'))); + return html.template({ + annotation: 'generateContentHeading', + + slots: { + title: {type: 'html'}, + id: {type: 'string'}, + }, + + content(slots) { + return html.tag('p', + { + class: 'content-heading', + id: slots.id, + tabindex: '0', + }, + slots.content); + }, + }); } } |