Skip to content

Commit f6c7c6a

Browse files
committed
chore(FileInput): 抽离图标 uiwjs#845
1 parent 12e3aee commit f6c7c6a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

packages/react-file-input/src/Card.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
FileInputStyleCardBoxInfoWarp,
77
FileInputStyleCardActionsRemoveWarp,
88
} from './style';
9-
import Icon from '@uiw/react-icon';
9+
import { IconStyleBase } from '@uiw/react-icon';
10+
import { Delete, Search } from '@uiw/icons';
1011
import { FileInputListProps } from './';
1112

1213
const Card = (props: FileInputListProps) => {
@@ -43,15 +44,15 @@ const Card = (props: FileInputListProps) => {
4344
className={`${prefixCls}-actions-remove`}
4445
onClick={() => onPreview?.(item)}
4546
>
46-
<Icon type="search" style={{ color: '#fff', fontSize: 16 }} />
47+
<IconStyleBase as={Search} style={{ color: '#fff', fontSize: 16 }} />
4748
</FileInputStyleCardActionsRemoveWarp>
4849
)}
4950
{showFileIcon?.showRemoveIcon && (
5051
<FileInputStyleCardActionsRemoveWarp
5152
className={`${prefixCls}-actions-remove`}
5253
onClick={() => onRemove?.(index)}
5354
>
54-
<Icon type="delete" style={{ color: '#fff', fontSize: 16 }} />
55+
<IconStyleBase as={Delete} style={{ color: '#fff', fontSize: 16 }} />
5556
</FileInputStyleCardActionsRemoveWarp>
5657
)}
5758
</FileInputStyleCardActionsWarp>

packages/react-file-input/src/List.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2-
import Icon from '@uiw/react-icon';
2+
import { IconStyleBase } from '@uiw/react-icon';
3+
import { Delete, Search } from '@uiw/icons';
34
import { FileInputListProps } from './';
45
import {
56
FileInputStyleListWarp,
@@ -56,7 +57,7 @@ const Picture = (props: FileInputListProps) => {
5657
className={`${prefixCls}-actions-search`}
5758
onClick={() => onPreview?.(item)}
5859
>
59-
<Icon type="search" style={{ color: '#fff', fontSize: 16 }} />
60+
<IconStyleBase as={Search} style={{ color: '#fff', fontSize: 16 }} />
6061
</FileInputStyleListActionsSearchWarp>
6162
</FileInputStyleListActionsWarp>
6263
)}
@@ -70,7 +71,7 @@ const Picture = (props: FileInputListProps) => {
7071
className={`${prefixCls}-${uploadType}-icon`}
7172
onClick={() => onRemove?.(index)}
7273
>
73-
<Icon type="delete" style={{ color: '#999' }} />
74+
<IconStyleBase as={Delete} style={{ color: '#999' }} />
7475
</FileInputStyleListUploadIconTypeWarp>
7576
)}
7677
</FileInputStyleListUploadTypeWarp>

0 commit comments

Comments
 (0)