diff --git a/.dumi/theme/common/Color/ColorPalettes.tsx b/.dumi/theme/common/Color/ColorPalettes.tsx index d689535050..2c4bd1729c 100644 --- a/.dumi/theme/common/Color/ColorPalettes.tsx +++ b/.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 ( -
+
{colors.map((color) => ( ))} diff --git a/components/icon/index.en-US.md b/components/icon/index.en-US.md index c5eb8eba3a..eb6bf437f4 100644 --- a/components/icon/index.en-US.md +++ b/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 -``` + ## List of icons diff --git a/components/icon/index.zh-CN.md b/components/icon/index.zh-CN.md index 09d0f3cffc..9d6434e3ef 100644 --- a/components/icon/index.zh-CN.md +++ b/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 -``` + ## 设计师专属 diff --git a/components/notification/PurePanel.tsx b/components/notification/PurePanel.tsx index 40db5e56db..47327e97ac 100644 --- a/components/notification/PurePanel.tsx +++ b/components/notification/PurePanel.tsx @@ -20,8 +20,7 @@ export const TypeIcon = { loading: , }; -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 || ( diff --git a/components/tag/index.tsx b/components/tag/index.tsx index 2e8d87a454..06a5ed1b63 100644 --- a/components/tag/index.tsx +++ b/components/tag/index.tsx @@ -123,9 +123,9 @@ const InternalTag: React.ForwardRefRenderFunction = ( typeof props.onClick === 'function' || (children && (children as React.ReactElement).type === 'a'); - const iconNode = icon || null; + const iconNode: React.ReactNode = icon || null; - const kids = iconNode ? ( + const kids: React.ReactNode = iconNode ? ( <> {iconNode} {children} @@ -134,7 +134,7 @@ const InternalTag: React.ForwardRefRenderFunction = ( children ); - const tagNode = ( + const tagNode: React.ReactNode = ( {kids} {mergedCloseIcon} diff --git a/components/tour/demo/mask.md b/components/tour/demo/mask.md index 1252fd1faf..c7c8f3c3f3 100644 --- a/components/tour/demo/mask.md +++ b/components/tour/demo/mask.md @@ -4,4 +4,4 @@ ## en-US -custom mask style. +Custom mask style. diff --git a/components/tour/index.en-US.md b/components/tour/index.en-US.md index 9830781c3f..d3a30d1d02 100644 --- a/components/tour/index.en-US.md +++ b/components/tour/index.en-US.md @@ -20,8 +20,8 @@ Use when you want to guide users through a product. Basic Non-modal Placement -custom mask style -custom indicator +Custom mask style +Custom indicator \_InternalPanelDoNotUseOrYouWillBeFired ## API