From bf265c0efebe0c233efe3e227790bc717e8feef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Mon, 20 May 2024 14:26:51 +0800 Subject: [PATCH] docs: fix some doc and lint issue (#48982) * chore: fix dumi lint * test: update snapshot --- .dumi/theme/common/PrevAndNext.tsx | 5 +- .../__snapshots__/demo-extend.test.ts.snap | 49 +++++-------------- .../__snapshots__/demo.test.tsx.snap | 37 ++++---------- components/form/demo/col-24-debug.tsx | 2 +- components/form/demo/component-token.tsx | 2 +- components/form/demo/form-context.tsx | 18 +++---- 6 files changed, 35 insertions(+), 78 deletions(-) diff --git a/.dumi/theme/common/PrevAndNext.tsx b/.dumi/theme/common/PrevAndNext.tsx index 96c76eab61..526ffedce3 100644 --- a/.dumi/theme/common/PrevAndNext.tsx +++ b/.dumi/theme/common/PrevAndNext.tsx @@ -1,15 +1,16 @@ import type { ReactElement } from 'react'; import React, { useContext, useMemo } from 'react'; import { LeftOutlined, RightOutlined } from '@ant-design/icons'; -import type { MenuProps } from 'antd'; +import type { GetProp, MenuProps } from 'antd'; import { createStyles } from 'antd-style'; -import type { MenuItemType } from 'antd/es/menu/hooks/useItems'; import classNames from 'classnames'; import useMenu from '../../hooks/useMenu'; import SiteContext from '../slots/SiteContext'; import type { SiteContextProps } from '../slots/SiteContext'; +type MenuItemType = Extract[number], { type?: 'item' }>; + const useStyle = createStyles(({ token, css }) => { const { colorSplit, iconCls, fontSizeIcon } = token; diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap index daa2d6bd76..7fcd9f740b 100644 --- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -807,7 +807,7 @@ Array [