Merge branch master into feature-merge-master

This commit is contained in:
栗嘉男 2023-07-05 15:43:52 +08:00
commit 041e38b5e6
7 changed files with 13 additions and 18 deletions

View File

@ -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 />
))}

View File

@ -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

View File

@ -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>
## 设计师专属

View File

@ -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`}>

View File

@ -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}

View File

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

View File

@ -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