Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/components/global/BestPracticeFigure/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { type ReactNode } from 'react';

import './best-practice-figure.css';

Expand Down Expand Up @@ -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 (
<div className="best-practice__container">
Expand Down
10 changes: 9 additions & 1 deletion src/components/global/Codepen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 1 addition & 2 deletions src/components/global/DocsCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/global/DocsCards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <docs-cards class={props.className}>{props.children}</docs-cards>;
}

Expand Down
Loading