From 0284fc9d8612b13401f4bedd633f231bc65126e5 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Thu, 3 Sep 2026 16:40:22 -0700 Subject: [PATCH] chore(cleanup): remove commented-out code and fix what it pointed at --- scripts/cli.mjs | 111 ------------------ src/components/global/Codepen/index.tsx | 3 +- src/components/global/DocDemo/demo.css | 8 -- .../page/native/DocsButton/index.tsx | 7 +- src/styles/components/_code.scss | 17 --- src/styles/components/_markdown.scss | 1 - vercel.json | 2 +- 7 files changed, 5 insertions(+), 144 deletions(-) diff --git a/scripts/cli.mjs b/scripts/cli.mjs index 7effc4dde4b..83f1f290187 100644 --- a/scripts/cli.mjs +++ b/scripts/cli.mjs @@ -11,7 +11,6 @@ const commandToKebab = (str) => .toLowerCase(); (async function () { - // console.log(cliJSON); const { commands } = cliJSON; commands.map(writePage); @@ -117,113 +116,3 @@ function renderAdvancedOptions({ options }) { } return utils.renderOptions('Advanced Options', options); } - -// function renderProperties({ props: properties }) { -// if (properties.length === 0) { -// return ""; -// } - -// return ` -// ## Properties - -// ${properties -// .map( -// prop => ` -// ### ${prop.name} - -// | | | -// | --- | --- | -// | **Description** | ${prop.docs.split("\n").join("
")} | -// | **Attribute** | \`${prop.attr}\` | -// | **Type** | \`${prop.type.replace(/\|/g, "\\|")}\` | -// | **Default** | \`${prop.default}\` | - -// ` -// ) -// .join("\n")} -// `; -// } - -// function renderEvents({ events }) { -// if (events.length === 0) { -// return ""; -// } - -// return ` -// ## Events - -// | Name | Description | -// | --- | --- | -// ${events.map(event => `| \`${event.event}\` | ${event.docs} |`).join("\n")} - -// `; -// } - -// function renderMethods({ methods }) { -// if (methods.length === 0) { -// return ""; -// } - -// return ` -// ## Methods - -// ${methods -// .map( -// method => ` -// ### ${method.name} - -// | | | -// | --- | --- | -// | **Description** | ${method.docs.split("\n").join("
")} | -// | **Signature** | \`${method.signature.replace(/\|/g, "\\|")}\` | -// ` -// ) -// .join("\n")} - -// `; -// } - -// function renderParts({ parts }) { -// if (parts.length === 0) { -// return ""; -// } - -// return ` -// ## CSS Shadow Parts - -// | Name | Description | -// | --- | --- | -// ${parts.map(prop => `| \`${prop.name}\` | ${prop.docs} |`).join("\n")} - -// `; -// } - -// function renderCustomProps({ styles: customProps }) { -// if (customProps.length === 0) { -// return ""; -// } - -// return ` -// ## CSS Custom Properties - -// | Name | Description | -// | --- | --- | -// ${customProps.map(prop => `| \`${prop.name}\` | ${prop.docs} |`).join("\n")} - -// `; -// } - -// function renderSlots({ slots }) { -// if (slots.length === 0) { -// return ""; -// } - -// return ` -// ## Slots - -// | Name | Description | -// | --- | --- | -// ${slots.map(slot => `| \`${slot.name}\` | ${slot.docs} |`).join("\n")} - -// `; -// } diff --git a/src/components/global/Codepen/index.tsx b/src/components/global/Codepen/index.tsx index 9b33ed7f262..bea888275b1 100644 --- a/src/components/global/Codepen/index.tsx +++ b/src/components/global/Codepen/index.tsx @@ -11,8 +11,7 @@ function CodePen(props: { preview?: boolean; penTitle?: string; }): ReactNode { - const status = useScript('https://static.codepen.io/assets/embed/ei.js'); - // console.log('test',status, props) + useScript('https://static.codepen.io/assets/embed/ei.js'); return (
ion-icon { margin-right: 5px; } -/* -@media (max-width: 1160px) { - .docs-demo-device, - .docs-demo-mode-toggle, - .docs-demo-source { - display: none; - } -} */ diff --git a/src/components/page/native/DocsButton/index.tsx b/src/components/page/native/DocsButton/index.tsx index fdee868c63f..3feb8a21ff3 100644 --- a/src/components/page/native/DocsButton/index.tsx +++ b/src/components/page/native/DocsButton/index.tsx @@ -1,5 +1,6 @@ import clsx from 'clsx'; import React, { type HTMLAttributes } from 'react'; +import Link from '@docusaurus/Link'; import styles from './styles.module.css'; @@ -8,8 +9,6 @@ export default function DocsButton({ round = false, ...props }: HTMLAttributes & { href?: string; round?: boolean }) { - // const isInternal = /^\/docs/.test(href); - props.className = clsx(props.className, { [styles.docsButton]: true, 'docs-button': true, @@ -18,9 +17,9 @@ export default function DocsButton({ }); return href ? ( - + {props.children} - + ) : (