From a31896dbc737a6422ae652a71e322517e3aa216f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Metz?= Date: Mon, 27 May 2024 15:38:59 +0200 Subject: [PATCH] Display since tag in the doc. --- docs/api/components.data.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/api/components.data.js b/docs/api/components.data.js index 1bc9234..4951a8e 100644 --- a/docs/api/components.data.js +++ b/docs/api/components.data.js @@ -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} @@ -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',