Skip to content

Commit

Permalink
fix: #588 CloseCircleOutlined svg
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 committed Jan 9, 2025
1 parent b4f1e23 commit f34030c
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 197 deletions.
2 changes: 2 additions & 0 deletions components/icon/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
CheckOutlined,
ClockCircleOutlined,
CloseCircleFilled,
CloseCircleOutlined,
CloseOutlined,
CopyOutlined,
DeleteOutlined,
Expand Down Expand Up @@ -89,6 +90,7 @@ const fileNameToClassName = {
CheckOutlined: 'anticon-check',
ClockCircleOutlined: 'anticon-clock-circle',
CloseCircleFilled: 'anticon-close-circle',
CloseCircleOutlined: 'dt-anticon-close-circle-outline',
CloseOutlined: 'anticon-close',
CopyOutlined: 'anticon-copy',
DeleteOutlined: 'anticon-delete',
Expand Down
3 changes: 2 additions & 1 deletion components/icon/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ subtitle: 图标
## 何时使用

- 使用设计提供的图标替换 antd 的图标,子产品不需要主动做什么,theme 作了统一处理;
- 大部分实底图标需要添加 theme 的自定义 className 配合使用,具体请查看下方 `自定义类名`
- 部分图标需要添加 theme 的自定义 className 配合使用,具体请查看下方 `自定义类名`

## 自定义类名

Expand All @@ -27,3 +27,4 @@ subtitle: 图标
|MinusCircleFilled |`dt-anticon-minus-circle-fill` |
|PlusCircleFilled |`dt-anticon-plus-circle-fill` |
|QuestionCircleFilled |`dt-anticon-question-circle-fill` |
|CloseCircleOutlined |`dt-anticon-close-circle-outline` |
1 change: 1 addition & 0 deletions custom-icons/generate/fileNameToClassName.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
CheckOutlined: 'anticon-check',
ClockCircleOutlined: 'anticon-clock-circle',
CloseCircleFilled: 'anticon-close-circle',
CloseCircleOutlined: 'dt-anticon-close-circle-outline',
CloseOutlined: 'anticon-close',
CopyOutlined: 'anticon-copy',
DeleteOutlined: 'anticon-delete',
Expand Down
1 change: 1 addition & 0 deletions custom-icons/iconfont-svgs/CloseCircleOutlined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions theme/dt-theme/default/custom-icons.less
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@
}
}

.dt-anticon-close-circle-outline svg path {
&:first-child {
d: path("M928 512C928 282.24 741.76 96 512 96S96 282.24 96 512s186.24 416 416 416 416-186.24 416-416zM153.376 512C153.376 313.936 313.936 153.376 512 153.376c198.064 0 358.624 160.56 358.624 358.624 0 198.064-160.56 358.624-358.624 358.624C313.936 870.624 153.376 710.064 153.376 512z m245.488-158.4a32 32 0 0 0-45.248 0l-1.632 1.76a32 32 0 0 0 1.632 43.504L466.72 512l-113.12 113.136a32 32 0 0 0 0 45.264l1.76 1.616a32 32 0 0 0 43.488-1.616L512 557.248 625.12 670.4a32 32 0 0 0 45.264 0l1.616-1.76a32 32 0 0 0-1.616-43.504L557.232 512l113.168-113.136a32 32 0 0 0 0-45.248l-1.76-1.632a32 32 0 0 0-43.504 1.632L512 466.72l-113.12-113.12z") !important;
}
&:not(:first-child) {
d: path("") !important;
}
}

.anticon-close svg path {
&:first-child {
d: path("M817.472 206.528a32 32 0 0 1 0 45.264L557.248 512l260.224 260.208a32 32 0 1 1-45.264 45.264L512 557.248 251.792 817.472a32 32 0 1 1-45.264-45.264L466.752 512 206.528 251.792a32 32 0 1 1 45.264-45.264L512 466.752l260.208-260.224a32 32 0 0 1 45.264 0z");
Expand Down
Loading

0 comments on commit f34030c

Please sign in to comment.