Browse Source

chore: remove warnings from site code (#43118)

* chore: remove / from old version url

* chore: remove dev warning
pull/43128/head
afc163 1 year ago
committed by GitHub
parent
commit
4ef820fc49
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .dumi/pages/index/components/Theme/ColorPicker.tsx
  2. 4
      .dumi/pages/index/components/Theme/index.tsx
  3. 2
      .dumi/theme/slots/Header/index.tsx
  4. 10
      .dumi/theme/slots/Sidebar/index.tsx

8
.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 = (
<DebouncedColorPicker value={value || ''} onChange={onChange}>
<DebouncedColorPicker
key={`colorpicker-${value}`}
value={value || ''}
onChange={onChange}
>
{colorNode}
</DebouncedColorPicker>
);

4
.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,
}
: {

2
.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}
/>,

10
.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 = (
<ConfigProvider theme={{ components: { Menu: { colorItemBg: colorBgContainer } } }}>
<ConfigProvider theme={{ components: { Menu: { itemBg: colorBgContainer } } }}>
<Menu
items={menuItems}
inlineIndent={30}

Loading…
Cancel
Save