docs: add ComponentCode component

This commit is contained in:
Benjamin Canac
2024-07-09 18:11:33 +02:00
parent bdc3217571
commit 5a13e1bf41
4 changed files with 137 additions and 10 deletions

View File

@@ -3,12 +3,12 @@ import json5 from 'json5'
const appConfig = useAppConfig()
const { data: ast } = await useAsyncData<any>(`icons-theme`, () => parseMarkdown(`
const { data: ast } = await useAsyncData(`icons-theme`, () => parseMarkdown(`
\`\`\`yml
${json5.stringify(appConfig.ui.icons, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')}
\`\`\`\
::callout{icon="i-heroicons-light-bulb"}
::tip
You can customize this component in your \`app.config.ts\` under \`ui.icons\` key.
::
`))