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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
14 additions and
10 deletions
-
.dumi/pages/index/components/Theme/ColorPicker.tsx
-
.dumi/pages/index/components/Theme/index.tsx
-
.dumi/theme/slots/Header/index.tsx
-
.dumi/theme/slots/Sidebar/index.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> |
|
|
|
); |
|
|
|
|
|
@ -377,8 +377,8 @@ export default function Theme() { |
|
|
|
}, |
|
|
|
Menu: isLight |
|
|
|
? { |
|
|
|
colorItemBg: 'transparent', |
|
|
|
colorSubItemBg: 'transparent', |
|
|
|
itemBg: 'transparent', |
|
|
|
subMenuItemBg: 'transparent', |
|
|
|
colorActiveBarWidth: 0, |
|
|
|
} |
|
|
|
: { |
|
|
|
|
|
@ -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} |
|
|
|
/>, |
|
|
|
|
|
@ -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} |
|
|
|