From 79d677fa9a554fd823439279ba6296ec4f08fc03 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Mon, 2 Sep 2024 22:46:38 +0200 Subject: [PATCH] docs(vue): fix markup --- src/components/markdown/DemoIntegrations.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/markdown/DemoIntegrations.js b/src/components/markdown/DemoIntegrations.js index 600effe77..73baf269c 100644 --- a/src/components/markdown/DemoIntegrations.js +++ b/src/components/markdown/DemoIntegrations.js @@ -42,9 +42,10 @@ const formatParam = (param, useRealJson = false) => { const DemoIntegrations = ({ caption, parameters = {}, showCard = true }) => { const params = useMemo(() => ({ ...DEFAULTS, ...parameters }), [parameters]) const paramKeys = useMemo(() => Object.keys(params), [params]) - const withoutUrl = useMemo(() => paramKeys.filter(k => k !== 'url'), [ - paramKeys - ]) + const withoutUrl = useMemo( + () => paramKeys.filter(k => k !== 'url'), + [paramKeys] + ) const react = useMemo( () => @@ -73,7 +74,7 @@ const DemoIntegrations = ({ caption, parameters = {}, showCard = true }) => { const param = params[key] const prefix = typeof param === 'string' ? '' : ':' const attr = `${prefix}${kebabCase(key)}` - return `\n\t\t${attr}="${formatParam(param)}"` + return `\n ${attr}="${formatParam(param)}"` }) .join(' '), [params, paramKeys] @@ -107,9 +108,10 @@ const DemoIntegrations = ({ caption, parameters = {}, showCard = true }) => { return jParams.length ? ` ${jParams}` : '' }, [params, withoutUrl]) - const vanilla = useMemo(() => (jsObject.length ? `, { ${jsObject} }` : ''), [ - jsObject - ]) + const vanilla = useMemo( + () => (jsObject.length ? `, { ${jsObject} }` : ''), + [jsObject] + ) return ( <> @@ -120,7 +122,8 @@ const DemoIntegrations = ({ caption, parameters = {}, showCard = true }) => { `, Vue: ` `,