-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the names of some icons and add a new category for token icons #443
Changes from 2 commits
8dcfa85
80c833b
77b2fb8
915ec57
6945521
72b9f9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ant-design/web3-icons': patch | ||
--- | ||
|
||
Fix the correct name for the Cronos icon, update the name for the token, and add a new token icons category. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,26 +13,35 @@ const chain = [ | |
'Polygon', | ||
'Sui', | ||
'Tron', | ||
'USDT', | ||
'Base', | ||
'Avalanche', | ||
'Fantom', | ||
'Celo', | ||
'Cronos', | ||
'Moonbeam', | ||
]; | ||
|
||
const token = ['DAI', 'WBTC', 'AAVE', 'USDT']; | ||
|
||
const tool = [ | ||
'CoinbaseWallet', | ||
'Etherscan', | ||
'MetaMask', | ||
'WalletConnect', | ||
'TokenPocket', | ||
'Safeheron', | ||
'Uniswap', | ||
'PancakeSwap', | ||
'SushiSwap', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Due to duplicate IDs, when multiple icons are present on the page, there may be display issues. You can fix it like: #346 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
]; | ||
|
||
const datum = [...chain, ...tool]; | ||
const datum = [...chain, ...token, ...tool]; | ||
|
||
const other = all.filter((n) => !datum.includes(n)); | ||
|
||
export const categories = { | ||
chain, | ||
token, | ||
tool, | ||
other, | ||
}; | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as React from 'react'; | ||
import AntdIcon from '@ant-design/icons'; | ||
import SVGComponent from '../svgs/cronos-colorful.svg'; | ||
import { type IconBaseProps } from '@ant-design/icons/lib/components/Icon'; | ||
import classnames from 'classnames'; | ||
import { ConfigProvider } from 'antd'; | ||
|
||
export const CronosColorful = React.forwardRef<HTMLSpanElement, IconBaseProps>((props, ref) => { | ||
const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext); | ||
const prefixCls = getPrefixCls('web3-icon-cronos-colorful'); | ||
return ( | ||
<AntdIcon | ||
{...props} | ||
className={classnames(prefixCls, props.className)} | ||
ref={ref} | ||
component={SVGComponent} | ||
/> | ||
); | ||
}); | ||
CronosColorful.displayName = 'CronosColorful'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. The wording has been adjusted accordingly.