diff --git a/packages/vkui-docs-theme/src/components/Head.tsx b/packages/vkui-docs-theme/src/components/Head.tsx index c2ec36f070..67bbc51097 100644 --- a/packages/vkui-docs-theme/src/components/Head.tsx +++ b/packages/vkui-docs-theme/src/components/Head.tsx @@ -7,7 +7,8 @@ export function Head() { const { resolvedColorScheme } = useColorScheme(); const mounted = useMounted(); - const head = typeof themeConfig.head === 'function' ? themeConfig.head({}) : themeConfig.head; + const ThemeConfigHead = themeConfig.head; + const head = typeof ThemeConfigHead === 'function' ? : ThemeConfigHead; return ( diff --git a/packages/vkui-docs-theme/src/mdx/Main/Main.tsx b/packages/vkui-docs-theme/src/mdx/Main/Main.tsx index c3c93d4f19..f32c791f4a 100644 --- a/packages/vkui-docs-theme/src/mdx/Main/Main.tsx +++ b/packages/vkui-docs-theme/src/mdx/Main/Main.tsx @@ -1,4 +1,4 @@ -import type * as React from 'react'; +import * as React from 'react'; import { Breadcrumbs, NavLinks } from '../../components'; import { useConfig, useThemeConfig } from '../../contexts'; import styles from './Main.module.css'; @@ -25,7 +25,8 @@ export function Main({ children }: { children: React.ReactNode }) { ); - const body = themeConfig.main?.({ children: content }) || content; + const ThemeConfigMain = themeConfig.main || React.Fragment; + const body = {content}; if (themeContext.layout === 'full') { return
{body}
; diff --git a/packages/vkui/src/testing/e2e/ComponentPlayground.tsx b/packages/vkui/src/testing/e2e/ComponentPlayground.tsx index 06f4265bde..4508cc09e5 100644 --- a/packages/vkui/src/testing/e2e/ComponentPlayground.tsx +++ b/packages/vkui/src/testing/e2e/ComponentPlayground.tsx @@ -16,7 +16,7 @@ export interface InternalComponentPlaygroundProps; propSets?: Parameters>[0]; - children: (props: Props) => React.ReactNode; + children: React.FC; AppWrapper?: React.ComponentType; } @@ -36,7 +36,7 @@ export const ComponentPlayground = < platform, adaptivityProviderProps: adaptivityProviderPropsProp, propSets = [], - children, + children: Children, AppWrapper = AppDefaultWrapper, ...restProps }: InternalComponentPlaygroundProps): React.ReactNode => { @@ -90,7 +90,7 @@ export const ComponentPlayground = < )}
- {children(mappedProps)} +
diff --git a/yarn.lock b/yarn.lock index a42c31a88e..828b320600 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4974,11 +4974,11 @@ __metadata: linkType: hard "@types/react-dom@npm:^19.0.1": - version: 19.0.1 - resolution: "@types/react-dom@npm:19.0.1" - dependencies: - "@types/react": "npm:*" - checksum: 10/59d0704e445a3e0d034ef016c92dc1bbec0ba6c1af084bf6de18f0ac3abd18a632961b7fd48668c519137d0bd7bfa77a8135a66c2725d4b7f68b830be263a564 + version: 19.0.3 + resolution: "@types/react-dom@npm:19.0.3" + peerDependencies: + "@types/react": ^19.0.0 + checksum: 10/815907f7adaa078acbf1d1ae7b6bf69cebe86bd301b8b9744e392bc0f16feb31bfb9fe0bfa2681d7d86678c83d52dedba5ed9bc7776736d4050cdd426b8b2d2b languageName: node linkType: hard @@ -4992,11 +4992,11 @@ __metadata: linkType: hard "@types/react@npm:*, @types/react@npm:^19.0.1": - version: 19.0.1 - resolution: "@types/react@npm:19.0.1" + version: 19.0.8 + resolution: "@types/react@npm:19.0.8" dependencies: csstype: "npm:^3.0.2" - checksum: 10/930dd4904047059c48ae64a90fc5e8078b5bac0a14c9d927917e5a07e88e4e5073ddc944cbde90a955f9f815c23b7112caea63e407bc423913073bedecb097aa + checksum: 10/1080d5b96ee0b4395f8f167ae6952f570088ee03bdce69f8237aab82c32d9bd2b71106f787bac17ba351acc4aba5e3454bafca51f2eb11d1562073b821e63d15 languageName: node linkType: hard