diff --git a/.dumi/theme/common/styles/Icon.tsx b/.dumi/theme/common/styles/Icon.tsx
index 8b93a39..7eb7460 100644
--- a/.dumi/theme/common/styles/Icon.tsx
+++ b/.dumi/theme/common/styles/Icon.tsx
@@ -32,7 +32,7 @@ const Icon: React.FC = () => {
padding: 10px 0 0;
}
- .anticon {
+ .ant-icon {
margin: 12px 0 8px;
font-size: 36px;
transition: transform 0.3s ease-in-out;
@@ -59,7 +59,7 @@ const Icon: React.FC = () => {
color: #fff;
background-color: ${token.colorPrimary};
- .anticon {
+ .ant-icon {
transform: scale(1.4);
}
@@ -68,20 +68,20 @@ const Icon: React.FC = () => {
}
}
- &.CircleFilled .anticon {
+ &.CircleFilled .ant-icon {
border-radius: 50%;
}
&.CircleFilled:hover {
color: #000;
- .anticon {
+ .ant-icon {
color: #000;
background-color: #000;
}
}
- &.isWhite .anticon {
+ &.isWhite .ant-icon {
background-color: #000;
}
diff --git a/docs/icon.md b/docs/icon.md
index a667937..59038eb 100644
--- a/docs/icon.md
+++ b/docs/icon.md
@@ -8,3 +8,17 @@ group:
## Icon List
+
+## Basic Usage
+
+基本用法
自定义图标颜色
自定义图标
+
+## API
+
+| Property | Description | Type | Default | Version |
+| ----------- | ----------------------------- | --------------- | ------- | ------- |
+| color | 基础颜色 | `string` | | `1.0.0` |
+| hoverColor | hover颜色 | `string` | | `1.0.0` |
+| activeColor | 点击颜色 | `string` | | `1.0.0` |
+| style | 设置图标的样式,例如 fontSize | `CSSProperties` | | `1.0.0` |
+| className | 计算后的 svg 类名 | `CSSProperties` | | `1.0.0` |
diff --git a/docs/iconDemos/basic.tsx b/docs/iconDemos/basic.tsx
new file mode 100644
index 0000000..51295a4
--- /dev/null
+++ b/docs/iconDemos/basic.tsx
@@ -0,0 +1,12 @@
+import React from 'react';
+import { AddCircleOutlined, DownOutlined } from '@aelf-design/internal-icons';
+import { Space } from 'antd';
+
+const App: React.FC = () => (
+
+
+
+
+);
+
+export default App;
diff --git a/docs/iconDemos/custom.tsx b/docs/iconDemos/custom.tsx
new file mode 100644
index 0000000..0ef635f
--- /dev/null
+++ b/docs/iconDemos/custom.tsx
@@ -0,0 +1,68 @@
+import React from 'react';
+import { AddCircleOutlined, AelfIcon } from '@aelf-design/internal-icons';
+import { Space } from 'antd';
+import type { GetProps } from 'antd';
+
+type CustomIconComponentProps = GetProps;
+
+const HeartSvg = () => (
+
+);
+
+const PandaSvg = () => (
+
+);
+
+const HeartIcon = (props: Partial) => (
+
+);
+
+const PandaIcon = (props: Partial) => (
+
+);
+
+const App: React.FC = () => (
+
+
+
+ } />
+
+
+);
+
+export default App;
diff --git a/docs/iconDemos/customColor.tsx b/docs/iconDemos/customColor.tsx
new file mode 100644
index 0000000..bd58c82
--- /dev/null
+++ b/docs/iconDemos/customColor.tsx
@@ -0,0 +1,12 @@
+import React from 'react';
+import { AddCircleOutlined, DownOutlined } from '@aelf-design/internal-icons';
+import { Space } from 'antd';
+
+const App: React.FC = () => (
+
+
+
+
+);
+
+export default App;
diff --git a/packages/internal-icons/src/components/DownArrowIcon.tsx b/packages/internal-icons/src/components/DownArrowIcon.tsx
index b7414ee..901613a 100644
--- a/packages/internal-icons/src/components/DownArrowIcon.tsx
+++ b/packages/internal-icons/src/components/DownArrowIcon.tsx
@@ -8,4 +8,4 @@ const componentName = 'DownArrowIcon';
export const DownArrowIcon = React.forwardRef((props, ref) => {
return ;
});
-DownArrowIcon.displayName = 'DownArrowIcon';
+DownArrowIcon.displayName = componentName;
diff --git a/packages/internal-icons/src/components/EyeTwoToneIcon.tsx b/packages/internal-icons/src/components/EyeTwoToneIcon.tsx
index e61a484..39a2816 100644
--- a/packages/internal-icons/src/components/EyeTwoToneIcon.tsx
+++ b/packages/internal-icons/src/components/EyeTwoToneIcon.tsx
@@ -8,4 +8,4 @@ const componentName = 'EyeTwoToneIcon';
export const EyeTwoToneIcon = React.forwardRef((props, ref) => {
return ;
});
-EyeTwoToneIcon.displayName = 'EyeTwoToneIcon';
+EyeTwoToneIcon.displayName = componentName;