mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
site: optimization type & props (#43433)
* chore: optimization type & props * fix: remove useless type
This commit is contained in:
parent
266e60aa95
commit
0d31270277
@ -1,7 +1,6 @@
|
||||
import type { FC } from 'react';
|
||||
import React from 'react';
|
||||
import type { IPreviewerProps } from 'dumi';
|
||||
import { useTabMeta } from 'dumi';
|
||||
import React from 'react';
|
||||
import CodePreviewer from './CodePreviewer';
|
||||
import DesignPreviewer from './DesignPreviewer';
|
||||
|
||||
@ -9,7 +8,7 @@ export interface AntdPreviewerProps extends IPreviewerProps {
|
||||
originDebug?: IPreviewerProps['debug'];
|
||||
}
|
||||
|
||||
const Previewer: FC<AntdPreviewerProps> = ({ ...props }) => {
|
||||
const Previewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
const tab = useTabMeta();
|
||||
|
||||
if (tab?.frontmatter.title === 'Design') {
|
||||
|
@ -14,7 +14,7 @@ export type ThemeSwitchProps = {
|
||||
onChange: (value: ThemeName[]) => void;
|
||||
};
|
||||
|
||||
const ThemeSwitch: React.FC<ThemeSwitchProps> = (props: ThemeSwitchProps) => {
|
||||
const ThemeSwitch: React.FC<ThemeSwitchProps> = (props) => {
|
||||
const { value = ['light'], onChange } = props;
|
||||
const { token } = useSiteToken();
|
||||
const { pathname, search } = useLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user