diff --git a/src/components/global/BestPracticeFigure/index.tsx b/src/components/global/BestPracticeFigure/index.tsx
index b0254eca824..cc024dca957 100644
--- a/src/components/global/BestPracticeFigure/index.tsx
+++ b/src/components/global/BestPracticeFigure/index.tsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { type ReactNode } from 'react';
import './best-practice-figure.css';
@@ -54,6 +54,14 @@ export default function BestPracticeFigure({
doImage,
doNotImage,
cautionImage,
+}: {
+ text: ReactNode;
+ doText: ReactNode;
+ doNotText?: ReactNode;
+ cautionText?: ReactNode;
+ doImage: ReactNode;
+ doNotImage?: ReactNode;
+ cautionImage?: ReactNode;
}) {
return (
diff --git a/src/components/global/Codepen/index.tsx b/src/components/global/Codepen/index.tsx
index 8b7b8854da9..9b33ed7f262 100644
--- a/src/components/global/Codepen/index.tsx
+++ b/src/components/global/Codepen/index.tsx
@@ -2,7 +2,15 @@ import React, { type ReactNode } from 'react';
import { useScript } from '@site/src/utils/hooks';
-function CodePen(props): ReactNode {
+function CodePen(props: {
+ height?: number | string;
+ theme?: string;
+ defaultTab?: string;
+ user?: string;
+ slug?: string;
+ preview?: boolean;
+ penTitle?: string;
+}): ReactNode {
const status = useScript('https://static.codepen.io/assets/embed/ei.js');
// console.log('test',status, props)
return (
diff --git a/src/components/global/DocsCard/index.tsx b/src/components/global/DocsCard/index.tsx
index 0e191ae6618..fac87607abe 100644
--- a/src/components/global/DocsCard/index.tsx
+++ b/src/components/global/DocsCard/index.tsx
@@ -53,11 +53,10 @@ function DocsCard(props: Props): ReactNode {
>
);
- const className = clsx({
+ const className = clsx(props.className, {
'Card-with-image': typeof props.img !== 'undefined',
'Card-without-image': typeof props.img === 'undefined',
'Card-size-lg': props.size === 'lg',
- [props.className]: props.className,
});
if (isStatic) {
diff --git a/src/components/global/DocsCards/index.tsx b/src/components/global/DocsCards/index.tsx
index ea2d310e791..1f040dc8148 100644
--- a/src/components/global/DocsCards/index.tsx
+++ b/src/components/global/DocsCards/index.tsx
@@ -2,7 +2,7 @@ import React, { type ReactNode } from 'react';
import './cards.css';
-function DocsCards(props): ReactNode {
+function DocsCards(props: { className?: string; children?: ReactNode }): ReactNode {
return
{props.children};
}
diff --git a/src/components/global/Playground/index.tsx b/src/components/global/Playground/index.tsx
index e47a69075ca..b5c117ffc84 100644
--- a/src/components/global/Playground/index.tsx
+++ b/src/components/global/Playground/index.tsx
@@ -1,10 +1,19 @@
-import React, { RefObject, forwardRef, useEffect, useMemo, useRef, useState } from 'react';
+import React, {
+ ForwardedRef,
+ type ReactElement,
+ type ReactNode,
+ forwardRef,
+ useEffect,
+ useMemo,
+ useRef,
+ useState,
+} from 'react';
import useBaseUrl from '@docusaurus/useBaseUrl';
import './playground.css';
import { EditorOptions, openAngularEditor, openHtmlEditor, openReactEditor, openVueEditor } from './stackblitz.utils';
import { useColorMode } from '@docusaurus/theme-common';
-import { ConsoleItem, Mode, UsageTarget } from './playground.types';
+import { CodeSnippets, ConsoleItem, Mode, UsageTarget } from './playground.types';
import Tooltip from '../Tooltip';
import PlaygroundTabs from '../PlaygroundTabs';
@@ -30,7 +39,7 @@ const ControlButton = forwardRef(
label: string;
disabled?: boolean;
},
- ref: RefObject
+ ref: ForwardedRef
) => {
const controlButton = (