Skip to content

Commit

Permalink
fix: delete unused icon
Browse files Browse the repository at this point in the history
  • Loading branch information
aelf-lxy committed Mar 25, 2024
1 parent 1362d6a commit 9108c79
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 121 deletions.
4 changes: 2 additions & 2 deletions packages/component/src/Address/copy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { CopyIcon } from '@aelf-design/internal-icons';
import { CopyOutlined } from '@aelf-design/internal-icons';
import { message } from 'antd';
import copy from 'copy-to-clipboard';

Expand All @@ -14,5 +14,5 @@ export default function Copy({ value, className }: { value: string; className?:
message.error('Copy failed, please copy by yourself.');
}
};
return <CopyIcon className={className} onClick={handleCopy} />;
return <CopyOutlined className={className} onClick={handleCopy} />;
}
21 changes: 7 additions & 14 deletions packages/component/src/Address/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,20 @@ const useStyles = createStyles(
: size === 'large'
? '24px'
: '28px'};
font-size: ${size === 'small'
? '12px'
: size === 'default'
? '14px'
: size === 'large'
? '16px'
: '20px'};
display: flex;
flex-shrink: 0;
margin-left: ${size === 'small' ? '4px' : '8px'};
align-items: center;
cursor: pointer;
`,
copyBtn: css`
width: ${size === 'small'
? '12px'
: size === 'default'
? '16px'
: size === 'large'
? '18px'
: '20px'};
height: ${size === 'small'
? '12px'
: size === 'default'
? '16px'
: size === 'large'
? '18px'
: '20px'};
path {
fill: ${primaryIconColor || token.customAddress?.primaryIconColor};
}
Expand Down
32 changes: 16 additions & 16 deletions packages/component/src/Button/demos/type.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { QueryIcon } from '@aelf-design/internal-icons';
import { SearchOutlined } from '@aelf-design/internal-icons';
import { Button } from 'aelf-design';
import { Space } from 'antd';

Expand Down Expand Up @@ -29,31 +29,31 @@ const App: React.FC = () => {
</Button>
</Space>
<Space>
<Button shape="circle" icon={<QueryIcon />} />
<Button shape="circle" type="primary" icon={<QueryIcon />} />
<Button shape="circle" type="dashed" icon={<QueryIcon />} />
<Button shape="circle" type="primary" ghost icon={<QueryIcon />} />
<Button shape="circle" danger icon={<QueryIcon />} />
<Button shape="circle" icon={<SearchOutlined />} />
<Button shape="circle" type="primary" icon={<SearchOutlined />} />
<Button shape="circle" type="dashed" icon={<SearchOutlined />} />
<Button shape="circle" type="primary" ghost icon={<SearchOutlined />} />
<Button shape="circle" danger icon={<SearchOutlined />} />
</Space>
<Space>
<Button icon={<QueryIcon />} />
<Button type="primary" icon={<QueryIcon />} />
<Button type="dashed" icon={<QueryIcon />} />
<Button type="primary" ghost icon={<QueryIcon />} />
<Button danger icon={<QueryIcon />} />
<Button icon={<SearchOutlined />} />
<Button type="primary" icon={<SearchOutlined />} />
<Button type="dashed" icon={<SearchOutlined />} />
<Button type="primary" ghost icon={<SearchOutlined />} />
<Button danger icon={<SearchOutlined />} />
</Space>
<Space>
<Button icon={<QueryIcon />}>button</Button>
<Button type="primary" icon={<QueryIcon />}>
<Button icon={<SearchOutlined />}>button</Button>
<Button type="primary" icon={<SearchOutlined />}>
button
</Button>
<Button type="dashed" icon={<QueryIcon />}>
<Button type="dashed" icon={<SearchOutlined />}>
button
</Button>
<Button type="primary" ghost icon={<QueryIcon />}>
<Button type="primary" ghost icon={<SearchOutlined />}>
button
</Button>
<Button danger icon={<QueryIcon />}>
<Button danger icon={<SearchOutlined />}>
button
</Button>
</Space>
Expand Down
4 changes: 2 additions & 2 deletions packages/component/src/Collapse/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { DownArrowIcon } from '@aelf-design/internal-icons';
import { DownOutlined } from '@aelf-design/internal-icons';
import { Collapse as AntdCollapse, CollapseProps } from 'antd';

import useStyles from './style';
Expand All @@ -13,7 +13,7 @@ function Collapse({ className, ...rest }: ICollapseProps) {
return (
<AntdCollapse
{...rest}
expandIcon={({ isActive }) => <DownArrowIcon className={cx(isActive && st.collapseIcon)} />}
expandIcon={({ isActive }) => <DownOutlined className={cx(isActive && st.collapseIcon)} />}
expandIconPosition={'end'}
className={cx(st.aelfdCollapse, className)}
/>
Expand Down
6 changes: 3 additions & 3 deletions packages/component/src/Input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { ReactNode } from 'react';
import {
CircleCloseIconOutlined,
EyeInvisibleOutlinedIcon,
EyeTwoToneIcon,
EyeInvisibleOutlined,
EyeOutlined,
IconProps,
} from '@aelf-design/internal-icons';
import { Input as AntdInput, InputProps } from 'antd';
Expand Down Expand Up @@ -101,7 +101,7 @@ function InputPassword({
}
}
iconRender={(visible) =>
visible ? <EyeTwoToneIcon {...iconProps} /> : <EyeInvisibleOutlinedIcon {...iconProps} />
visible ? <EyeInvisibleOutlined {...iconProps} /> : <EyeOutlined {...iconProps} />
}
></AntdInput.Password>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/component/src/Pagination/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useMemo, useState } from 'react';
import { DownArrowIcon, LeftOutlined, RightOutlined } from '@aelf-design/internal-icons';
import { DownOutlined, LeftOutlined, RightOutlined } from '@aelf-design/internal-icons';
import { Select } from 'antd';
import { debounce } from 'lodash-es';

Expand Down Expand Up @@ -134,7 +134,7 @@ export default function Pagination({
className={styles.pagesizeSelect}
popupClassName={styles.pageSizePopup}
popupMatchSelectWidth={false}
suffixIcon={<DownArrowIcon />}
suffixIcon={<DownOutlined />}
options={pagesizeOptions}
onChange={sizeChange}
/>
Expand Down
10 changes: 5 additions & 5 deletions packages/component/src/Search/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MouseEvent } from 'react';
import React, { useCallback, useMemo, useState } from 'react';
import { DownArrowIcon, QueryIcon } from '@aelf-design/internal-icons';
import { DownOutlined, SearchOutlined } from '@aelf-design/internal-icons';
import type { MenuProps } from 'antd';
import type { MenuItemType } from 'antd/lib/menu/hooks/useItems';

Expand Down Expand Up @@ -70,7 +70,7 @@ function Search({
isErrorStatus && styles.searchBtnDisabled,
)}
>
<QueryIcon />
<SearchOutlined />
</div>
);

Expand All @@ -90,7 +90,7 @@ function Search({

const prefixDom = useMemo(() => {
if (filterItems.length === 0) {
return <QueryIcon />;
return <SearchOutlined />;
}
return (
<Dropdown
Expand All @@ -109,10 +109,10 @@ function Search({
<div className={styles.searchDropDownWrap}>
<div className={styles.searchDropDownLeft}>
<div className={styles.searchDropDownLeftLabel}>{checkedItem?.value}</div>
<DownArrowIcon className={cx(isDropDownOpen && styles.collapseIcon)} />
<DownOutlined className={cx(isDropDownOpen && styles.collapseIcon)} />
</div>
<div className={styles.searchDropDownRight}>
<QueryIcon />
<SearchOutlined />
</div>
</div>
</Dropdown>
Expand Down
8 changes: 4 additions & 4 deletions packages/component/src/Tabs/demos/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { DownArrowIcon } from '@aelf-design/internal-icons';
import { DownOutlined } from '@aelf-design/internal-icons';
import { Tabs } from 'aelf-design';
import { Space } from 'antd';

Expand All @@ -8,19 +8,19 @@ const tabItems = [
key: '1',
label: 'Tab 1',
children: 'Content of Tab Pane 1',
icon: <DownArrowIcon />,
icon: <DownOutlined />,
},
{
key: '2',
label: 'Tab 2',
children: 'Content of Tab Pane 2',
icon: <DownArrowIcon />,
icon: <DownOutlined />,
},
{
key: '3',
label: 'Tabxxxxxx 3',
children: 'Content of Tab Pane 3',
icon: <DownArrowIcon />,
icon: <DownOutlined />,
},
];
const App: React.FC = () => {
Expand Down
11 changes: 0 additions & 11 deletions packages/internal-icons/src/components/CopyIcon.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions packages/internal-icons/src/components/DownArrowIcon.tsx

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions packages/internal-icons/src/components/EyeTwoToneIcon.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions packages/internal-icons/src/components/QueryIcon.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/internal-icons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
export * from './components/CircleClose';
export * from './components/ClearIcon';
export * from './components/CloseIcon';
export * from './components/CopyIcon';
export * from './components/DownArrowIcon';
export * from './components/EyeInvisibleOutlinedIcon';
export * from './components/EyeTwoToneIcon';
export * from './components/FileIcon';
export * from './components/NextButtonIcon';
export * from './components/PrevButtonIcon';
export * from './components/ProgressErrorIcon';
export * from './components/ProgressSuccessIcon';
export * from './components/QueryIcon';
export * from './components/UploadIcon';

export * from './components/direction/index';
Expand Down

0 comments on commit 9108c79

Please sign in to comment.