Browse Source

Merge branch master into feature-merge-master

pull/43342/head
栗嘉男 1 year ago
parent
commit
041e38b5e6
  1. 4
      .dumi/theme/common/Color/ColorPalettes.tsx
  2. 6
      components/icon/index.en-US.md
  3. 6
      components/icon/index.zh-CN.md
  4. 3
      components/notification/PurePanel.tsx
  5. 6
      components/tag/index.tsx
  6. 2
      components/tour/demo/mask.md
  7. 4
      components/tour/index.en-US.md

4
.dumi/theme/common/Color/ColorPalettes.tsx

@ -1,4 +1,4 @@
import classnames from 'classnames';
import classNames from 'classnames';
import React from 'react';
import Palette from './Palette';
@ -80,7 +80,7 @@ const colors = [
const ColorPalettes: React.FC<{ dark?: boolean }> = (props) => {
const { dark } = props;
return (
<div className={classnames('color-palettes', { 'color-palettes-dark': dark })}>
<div className={classNames('color-palettes', { 'color-palettes-dark': dark })}>
{colors.map((color) => (
<Palette key={color.name} color={color} dark={dark} showTitle />
))}

6
components/icon/index.en-US.md

@ -12,11 +12,9 @@ demo:
## How to use
Before use icons, you need to install `@ant-design/icons` package:
Before use icons, you need to install [@ant-design/icons](https://github.com/ant-design/ant-design-icons) package:
```bash
npm install --save @ant-design/icons
```
<InstallDependencies npm='npm install @ant-design/icons --save' yarn='yarn add @ant-design/icons' pnpm='pnpm install @ant-design/icons --save'></InstallDependencies>
## List of icons

6
components/icon/index.zh-CN.md

@ -13,11 +13,9 @@ demo:
## 使用方法
使用图标组件,你需要安装 `@ant-design/icons` 图标组件包:
使用图标组件,你需要安装 [@ant-design/icons](https://github.com/ant-design/ant-design-icons) 图标组件包:
```bash
npm install --save @ant-design/icons
```
<InstallDependencies npm='npm install @ant-design/icons --save' yarn='yarn add @ant-design/icons' pnpm='pnpm install @ant-design/icons --save'></InstallDependencies>
## 设计师专属

3
components/notification/PurePanel.tsx

@ -20,8 +20,7 @@ export const TypeIcon = {
loading: <LoadingOutlined />,
};
export function getCloseIcon(prefixCls: string, closeIcon?: React.ReactNode) {
if (closeIcon === null || closeIcon === false) return null;
export function getCloseIcon(prefixCls: string, closeIcon?: React.ReactNode): React.ReactNode {
return (
closeIcon || (
<span className={`${prefixCls}-close-x`}>

6
components/tag/index.tsx

@ -123,9 +123,9 @@ const InternalTag: React.ForwardRefRenderFunction<HTMLSpanElement, TagProps> = (
typeof props.onClick === 'function' ||
(children && (children as React.ReactElement<any>).type === 'a');
const iconNode = icon || null;
const iconNode: React.ReactNode = icon || null;
const kids = iconNode ? (
const kids: React.ReactNode = iconNode ? (
<>
{iconNode}
<span>{children}</span>
@ -134,7 +134,7 @@ const InternalTag: React.ForwardRefRenderFunction<HTMLSpanElement, TagProps> = (
children
);
const tagNode = (
const tagNode: React.ReactNode = (
<span {...props} ref={ref} className={tagClassName} style={tagStyle}>
{kids}
{mergedCloseIcon}

2
components/tour/demo/mask.md

@ -4,4 +4,4 @@
## en-US
custom mask style.
Custom mask style.

4
components/tour/index.en-US.md

@ -20,8 +20,8 @@ Use when you want to guide users through a product.
<code src="./demo/basic.tsx">Basic</code>
<code src="./demo/non-modal.tsx">Non-modal</code>
<code src="./demo/placement.tsx">Placement</code>
<code src="./demo/mask.tsx">custom mask style</code>
<code src="./demo/indicator.tsx">custom indicator</code>
<code src="./demo/mask.tsx">Custom mask style</code>
<code src="./demo/indicator.tsx">Custom indicator</code>
<code src="./demo/render-panel.tsx" debug>\_InternalPanelDoNotUseOrYouWillBeFired</code>
## API

Loading…
Cancel
Save