Skip to content

Commit

Permalink
Display since tag in the doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed May 27, 2024
1 parent cdb3946 commit a31896d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/api/components.data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import { createMarkdownRenderer } from 'vitepress';
function formatProps(props) {
return props ? '## Props\n\n' + props.map((prop) => {
const deprecated = formatDeprecated(prop.tags);
const since = formatSince(prop.tags);
return `
### ${prop.name}
### ${prop.name} ${since} {#${prop.name}}
${deprecated}
Expand Down Expand Up @@ -72,6 +73,13 @@ ${deprecated.description}
}).join('\n') : '';
}

function formatSince(tags) {
return tags?.since ?
tags.since.map((s) => {
return `(since ${s.description})`;
}).join('') : '';
}

export default {
watch: [
'../../lib/components/*.component.ts',
Expand Down

0 comments on commit a31896d

Please sign in to comment.