From 4ef820fc49a1490d08add07b9801f9aabce2c470 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 20 Jun 2023 19:38:58 +0800 Subject: [PATCH] chore: remove warnings from site code (#43118) * chore: remove / from old version url * chore: remove dev warning --- .dumi/pages/index/components/Theme/ColorPicker.tsx | 8 ++++++-- .dumi/pages/index/components/Theme/index.tsx | 4 ++-- .dumi/theme/slots/Header/index.tsx | 2 +- .dumi/theme/slots/Sidebar/index.tsx | 10 +++++----- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.dumi/pages/index/components/Theme/ColorPicker.tsx b/.dumi/pages/index/components/Theme/ColorPicker.tsx index c9c6655b85..bb89b5b884 100644 --- a/.dumi/pages/index/components/Theme/ColorPicker.tsx +++ b/.dumi/pages/index/components/Theme/ColorPicker.tsx @@ -19,7 +19,7 @@ const useStyle = () => { transition: all ${token.motionDurationFast}; display: inline-block; - & > input[type="radio"] { + & > input[type='radio'] { width: 0; height: 0; opacity: 0; @@ -138,7 +138,11 @@ export default function ThemeColorPicker({ value, onChange }: RadiusPickerProps) if (picker) { colorNode = ( - + {colorNode} ); diff --git a/.dumi/pages/index/components/Theme/index.tsx b/.dumi/pages/index/components/Theme/index.tsx index 1fdd88bafb..406d300b22 100644 --- a/.dumi/pages/index/components/Theme/index.tsx +++ b/.dumi/pages/index/components/Theme/index.tsx @@ -377,8 +377,8 @@ export default function Theme() { }, Menu: isLight ? { - colorItemBg: 'transparent', - colorSubItemBg: 'transparent', + itemBg: 'transparent', + subMenuItemBg: 'transparent', colorActiveBarWidth: 0, } : { diff --git a/.dumi/theme/slots/Header/index.tsx b/.dumi/theme/slots/Header/index.tsx index b6938ed189..eb68d66192 100644 --- a/.dumi/theme/slots/Header/index.tsx +++ b/.dumi/theme/slots/Header/index.tsx @@ -299,7 +299,7 @@ const Header: React.FC = () => { defaultValue={pkg.version} onChange={handleVersionChange} dropdownStyle={getDropdownStyle} - dropdownMatchSelectWidth={false} + popupMatchSelectWidth={false} getPopupContainer={(trigger) => trigger.parentNode} options={versionOptions} />, diff --git a/.dumi/theme/slots/Sidebar/index.tsx b/.dumi/theme/slots/Sidebar/index.tsx index 8d1c219dd7..3a6fb7c367 100644 --- a/.dumi/theme/slots/Sidebar/index.tsx +++ b/.dumi/theme/slots/Sidebar/index.tsx @@ -1,11 +1,11 @@ -import React, { useContext } from 'react'; -import { useSidebarData } from 'dumi'; +import { css } from '@emotion/react'; import { Col, ConfigProvider, Menu } from 'antd'; +import { useSidebarData } from 'dumi'; import MobileMenu from 'rc-drawer'; -import { css } from '@emotion/react'; -import SiteContext from '../SiteContext'; +import React, { useContext } from 'react'; import useMenu from '../../../hooks/useMenu'; import useSiteToken from '../../../hooks/useSiteToken'; +import SiteContext from '../SiteContext'; const useStyle = () => { const { token } = useSiteToken(); @@ -134,7 +134,7 @@ const Sidebar: React.FC = () => { } = useSiteToken(); const menuChild = ( - +