Browse Source

chore: lint

docs/rm-emotion-react
MadCcc 1 year ago
parent
commit
7f0cbacf2f
  1. 12
      .dumi/pages/index/components/Banner.tsx
  2. 2
      .dumi/pages/index/components/Group.tsx
  3. 2
      .dumi/pages/index/components/Theme/ColorPicker.tsx
  4. 2
      .dumi/pages/index/components/Theme/ThemePicker.tsx
  5. 2
      .dumi/theme/common/PrevAndNext.tsx
  6. 2
      .dumi/theme/common/ThemeSwitch/index.tsx
  7. 2
      .dumi/theme/layouts/ResourceLayout/AffixTabs.tsx

12
.dumi/pages/index/components/Banner.tsx

@ -2,11 +2,11 @@ import { createStyles, css, useTheme } from 'antd-style';
import { Button, Space, Typography } from 'antd';
import { Link, useLocation } from 'dumi';
import * as React from 'react';
import classNames from 'classnames';
import useLocale from '../../../hooks/useLocale';
import SiteContext from '../../../theme/slots/SiteContext';
import * as utils from '../../../theme/utils';
import { GroupMask } from './Group';
import classNames from 'classnames';
const locales = {
cn: {
@ -25,13 +25,13 @@ const locales = {
const useStyle = () => {
const { isMobile } = React.useContext(SiteContext);
return createStyles(({ token }) => ({
titleBase: css`
titleBase: css`
h1& {
font-family: AliPuHui, ${token.fontFamily};
}
`,
title: isMobile
? css`
title: isMobile
? css`
h1& {
margin-bottom: ${token.margin}px;
font-weight: normal;
@ -39,14 +39,14 @@ const useStyle = () => {
line-height: ${token.lineHeightHeading2};
}
`
: css`
: css`
h1& {
margin-bottom: ${token.marginMD}px;
font-weight: 900;
font-size: 68px;
}
`,
}))();
}))();
};
export interface BannerProps {

2
.dumi/pages/index/components/Group.tsx

@ -1,8 +1,8 @@
import * as React from 'react';
import { useContext } from 'react';
import { Typography } from 'antd';
import SiteContext from '../../../theme/slots/SiteContext';
import { useTheme } from 'antd-style';
import SiteContext from '../../../theme/slots/SiteContext';
export interface GroupMaskProps {
style?: React.CSSProperties;

2
.dumi/pages/index/components/Theme/ColorPicker.tsx

@ -4,8 +4,8 @@ import type { Color, ColorPickerProps } from 'antd/es/color-picker';
import { generateColor } from 'antd/es/color-picker/util';
import type { FC } from 'react';
import React, { useEffect, useState } from 'react';
import { PRESET_COLORS } from './colorUtil';
import classNames from 'classnames';
import { PRESET_COLORS } from './colorUtil';
const useStyle = createStyles(({ token, css }) => ({
color: css`

2
.dumi/pages/index/components/Theme/ThemePicker.tsx

@ -1,8 +1,8 @@
import { createStyles, useTheme } from 'antd-style';
import { Space } from 'antd';
import * as React from 'react';
import useLocale from '../../../../hooks/useLocale';
import classNames from 'classnames';
import useLocale from '../../../../hooks/useLocale';
export const THEMES = {
default: 'https://gw.alipayobjects.com/zos/bmw-prod/ae669a89-0c65-46db-b14b-72d1c7dd46d6.svg',

2
.dumi/theme/common/PrevAndNext.tsx

@ -4,8 +4,8 @@ import type { MenuProps } from 'antd';
import type { MenuItemType } from 'antd/es/menu/hooks/useItems';
import type { ReactElement } from 'react';
import React, { useMemo } from 'react';
import useMenu from '../../hooks/useMenu';
import classNames from 'classnames';
import useMenu from '../../hooks/useMenu';
const useStyle = createStyles(({ token, css }) => {
const { colorSplit, iconCls, fontSizeIcon } = token;

2
.dumi/theme/common/ThemeSwitch/index.tsx

@ -3,9 +3,9 @@ import { FloatButton } from 'antd';
import { CompactTheme, DarkTheme, Motion } from 'antd-token-previewer/es/icons';
import { FormattedMessage, Link, useLocation } from 'dumi';
import React from 'react';
import { useTheme } from 'antd-style';
import { getLocalizedPathname, isZhCN } from '../../utils';
import ThemeIcon from './ThemeIcon';
import { useTheme } from 'antd-style';
export type ThemeName = 'light' | 'dark' | 'compact' | 'motion-off';

2
.dumi/theme/layouts/ResourceLayout/AffixTabs.tsx

@ -2,8 +2,8 @@ import { createStyles } from 'antd-style';
import { Tabs } from 'antd';
import throttle from 'lodash/throttle';
import * as React from 'react';
import scrollTo from '../../../../components/_util/scrollTo';
import classNames from 'classnames';
import scrollTo from '../../../../components/_util/scrollTo';
const listenerEvents = ['scroll', 'resize'] as const;

Loading…
Cancel
Save