diff --git a/.changeset/lazy-dolls-bake.md b/.changeset/lazy-dolls-bake.md new file mode 100644 index 000000000..a88896ca8 --- /dev/null +++ b/.changeset/lazy-dolls-bake.md @@ -0,0 +1,5 @@ +--- +'@ant-design/web3-icons': patch +--- + +fix: Fix the correct name for the Cronos icon, update the name for the token, and add a new token icons category. diff --git a/.dumi/theme/builtins/IconSearch/fields.ts b/.dumi/theme/builtins/IconSearch/fields.ts index 63a209a0e..c63f866dc 100644 --- a/.dumi/theme/builtins/IconSearch/fields.ts +++ b/.dumi/theme/builtins/IconSearch/fields.ts @@ -13,12 +13,17 @@ const chain = [ 'Polygon', 'Sui', 'Tron', - 'USDT', 'Base', 'Avalanche', + 'Fantom', + 'Celo', + 'Cronos', + 'Moonbeam', 'Solana', ]; +const token = ['DAI', 'WBTC', 'AAVE', 'USDT']; + const tool = [ 'CoinbaseWallet', 'Etherscan', @@ -26,15 +31,19 @@ const tool = [ 'WalletConnect', 'TokenPocket', 'Safeheron', + 'Uniswap', + 'PancakeSwap', + 'SushiSwap', 'Phantom', ]; -const datum = [...chain, ...tool]; +const datum = [...chain, ...token, ...tool]; const other = all.filter((n) => !datum.includes(n)); export const categories = { chain, + token, tool, other, }; diff --git a/.dumi/theme/locales/en-US.json b/.dumi/theme/locales/en-US.json index d554a4bf9..b9d287545 100644 --- a/.dumi/theme/locales/en-US.json +++ b/.dumi/theme/locales/en-US.json @@ -5,6 +5,7 @@ "app.docs.components.icon.filled": "Filled", "app.docs.components.icon.circle-filled": "Circle Filled", "app.docs.components.icon.category.chain": "Chain Icons", + "app.docs.components.icon.category.token": "Token Icons", "app.docs.components.icon.category.tool": "Tool Icons", "app.docs.components.icon.category.other": "Other Icons", diff --git a/.dumi/theme/locales/zh-CN.json b/.dumi/theme/locales/zh-CN.json index 9aefa9400..8c4a0e9ac 100644 --- a/.dumi/theme/locales/zh-CN.json +++ b/.dumi/theme/locales/zh-CN.json @@ -5,6 +5,7 @@ "app.docs.components.icon.filled": "单色风格", "app.docs.components.icon.circle-filled": "圆底单色", "app.docs.components.icon.category.chain": "链图标", + "app.docs.components.icon.category.token": "代币图标", "app.docs.components.icon.category.tool": "工具图标", "app.docs.components.icon.category.other": "其他图标", diff --git a/packages/icons/src/__tests__/__snapshots__/index.test.tsx.snap b/packages/icons/src/__tests__/__snapshots__/index.test.tsx.snap index 10f5e5c75..7359925e6 100644 --- a/packages/icons/src/__tests__/__snapshots__/index.test.tsx.snap +++ b/packages/icons/src/__tests__/__snapshots__/index.test.tsx.snap @@ -17,62 +17,34 @@ exports[`Test Icons > should render all icons 1`] = ` > - - - - - - - - - - - - - + + + + + + + @@ -604,135 +576,79 @@ exports[`Test Icons > should render all icons 13`] = ` fill="currentColor" focusable="false" height="1em" - viewBox="0 0 24 24" + viewBox="0 0 512 512" width="1em" + xml:space="preserve" xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" > - - - - - + - - - - - - - - - - - - - - - - - - - + + + + + - - - - + + `; @@ -1656,7 +1572,6 @@ exports[`Test Icons > should render all icons 33`] = ` > should render all icons 39`] = ` exports[`Test Icons > should render all icons 40`] = ` should render all icons 40`] = ` type="text/css" > - .st0{fill:#002D74;} - .st1{fill:url(#SVGID_1_);} - .st2{fill:url(#SVGID_00000061444671184501762360000006264132297249298069_);} - + .st0{fill:#002D74;} + .st1{fill:url(#ant-web3-icon-cronos-colorful-1);} + .st2{fill:url(#SVGID_00000061444671184501762360000006264132297249298069_);} + should render all icons 40`] = ` should render all icons 48`] = ` should render all icons 49`] = ` > @@ -2600,8 +2513,8 @@ exports[`Test Icons > should render all icons 52`] = ` type="text/css" > - .st0{clip-path:url(#SVGID_2_);} - .st1{fill:url(#SVGID_3_);} + .st0{clip-path:url(#ant-web3-icon-aave-circle-colorful-2);} + .st1{fill:url(#ant-web3-icon-aave-circle-colorful-3);} .st2{fill:#FFFFFF;} @@ -2609,26 +2522,25 @@ exports[`Test Icons > should render all icons 52`] = ` ((props, ref) => { +export const AAVECircleColorful = React.forwardRef((props, ref) => { const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext); const prefixCls = getPrefixCls('web3-icon-aave-circle-colorful'); return ( @@ -17,4 +17,4 @@ export const AaveCircleColorful = React.forwardRef ); }); -AaveCircleColorful.displayName = 'AaveCircleColorful'; +AAVECircleColorful.displayName = 'AAVECircleColorful'; diff --git a/packages/icons/src/components/cronos-circle-colorful.tsx b/packages/icons/src/components/cronos-circle-colorful.tsx deleted file mode 100644 index 225ddaf9c..000000000 --- a/packages/icons/src/components/cronos-circle-colorful.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from 'react'; -import AntdIcon from '@ant-design/icons'; -import SVGComponent from '../svgs/cronos-circle-colorful.svg'; -import { type IconBaseProps } from '@ant-design/icons/lib/components/Icon'; -import classnames from 'classnames'; -import { ConfigProvider } from 'antd'; - -export const CronosCircleColorful = React.forwardRef( - (props, ref) => { - const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext); - const prefixCls = getPrefixCls('web3-icon-cronos-circle-colorful'); - return ( - - ); - }, -); -CronosCircleColorful.displayName = 'CronosCircleColorful'; diff --git a/packages/icons/src/components/cronos-colorful.tsx b/packages/icons/src/components/cronos-colorful.tsx new file mode 100644 index 000000000..b85543634 --- /dev/null +++ b/packages/icons/src/components/cronos-colorful.tsx @@ -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((props, ref) => { + const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext); + const prefixCls = getPrefixCls('web3-icon-cronos-colorful'); + return ( + + ); +}); +CronosColorful.displayName = 'CronosColorful'; diff --git a/packages/icons/src/components/dai-circle-colorful.tsx b/packages/icons/src/components/dai-circle-colorful.tsx index b369a4ddd..9e12c141f 100644 --- a/packages/icons/src/components/dai-circle-colorful.tsx +++ b/packages/icons/src/components/dai-circle-colorful.tsx @@ -5,7 +5,7 @@ import { type IconBaseProps } from '@ant-design/icons/lib/components/Icon'; import classnames from 'classnames'; import { ConfigProvider } from 'antd'; -export const DaiCircleColorful = React.forwardRef((props, ref) => { +export const DAICircleColorful = React.forwardRef((props, ref) => { const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext); const prefixCls = getPrefixCls('web3-icon-dai-circle-colorful'); return ( @@ -17,4 +17,4 @@ export const DaiCircleColorful = React.forwardRef ); }); -DaiCircleColorful.displayName = 'DaiCircleColorful'; +DAICircleColorful.displayName = 'DAICircleColorful'; diff --git a/packages/icons/src/components/usdt-colorful.tsx b/packages/icons/src/components/usdt-colorful.tsx index ecf42a6da..f18129322 100644 --- a/packages/icons/src/components/usdt-colorful.tsx +++ b/packages/icons/src/components/usdt-colorful.tsx @@ -5,7 +5,7 @@ import { type IconBaseProps } from '@ant-design/icons/lib/components/Icon'; import classnames from 'classnames'; import { ConfigProvider } from 'antd'; -export const UsdtColorful = React.forwardRef((props, ref) => { +export const USDTColorful = React.forwardRef((props, ref) => { const { getPrefixCls } = React.useContext(ConfigProvider.ConfigContext); const prefixCls = getPrefixCls('web3-icon-usdt-colorful'); return ( @@ -17,4 +17,4 @@ export const UsdtColorful = React.forwardRef((pr /> ); }); -UsdtColorful.displayName = 'UsdtColorful'; +USDTColorful.displayName = 'USDTColorful'; diff --git a/packages/icons/src/index.ts b/packages/icons/src/index.ts index f33cf57f0..c7105a30f 100644 --- a/packages/icons/src/index.ts +++ b/packages/icons/src/index.ts @@ -42,7 +42,7 @@ export * from './components/chrome-circle-colorful'; export * from './components/tokenpocket-colorful'; -export * from './components/cronos-circle-colorful'; +export * from './components/cronos-colorful'; export * from './components/wbtc-circle-colorful'; export * from './components/dai-circle-colorful'; export * from './components/uniswap-colorful'; diff --git a/packages/icons/src/svgs/aave-circle-colorful.svg b/packages/icons/src/svgs/aave-circle-colorful.svg index 89fc7acce..1c2162217 100644 --- a/packages/icons/src/svgs/aave-circle-colorful.svg +++ b/packages/icons/src/svgs/aave-circle-colorful.svg @@ -1,20 +1,19 @@ - + - - + + - - - + + diff --git a/packages/icons/src/svgs/avalanche-circle-colorful.svg b/packages/icons/src/svgs/avalanche-circle-colorful.svg index 888ffdf8c..3d83f5465 100644 --- a/packages/icons/src/svgs/avalanche-circle-colorful.svg +++ b/packages/icons/src/svgs/avalanche-circle-colorful.svg @@ -5,9 +5,9 @@ - + - \ No newline at end of file + diff --git a/packages/icons/src/svgs/base-circle-colorful.svg b/packages/icons/src/svgs/base-circle-colorful.svg index e67c3acdb..c770c594c 100644 --- a/packages/icons/src/svgs/base-circle-colorful.svg +++ b/packages/icons/src/svgs/base-circle-colorful.svg @@ -2,8 +2,8 @@ - + - \ No newline at end of file + diff --git a/packages/icons/src/svgs/cronos-circle-colorful.svg b/packages/icons/src/svgs/cronos-circle-colorful.svg deleted file mode 100644 index 80c1b20b9..000000000 --- a/packages/icons/src/svgs/cronos-circle-colorful.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/icons/src/svgs/cronos-colorful.svg b/packages/icons/src/svgs/cronos-colorful.svg new file mode 100644 index 000000000..fa194228f --- /dev/null +++ b/packages/icons/src/svgs/cronos-colorful.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/packages/icons/src/svgs/fantom-circle-colorful.svg b/packages/icons/src/svgs/fantom-circle-colorful.svg index 1eefdee27..083d3a858 100644 --- a/packages/icons/src/svgs/fantom-circle-colorful.svg +++ b/packages/icons/src/svgs/fantom-circle-colorful.svg @@ -9,7 +9,7 @@ - + diff --git a/packages/icons/src/svgs/sushiswap-colorful.svg b/packages/icons/src/svgs/sushiswap-colorful.svg index 7e3509c39..16a1d767c 100644 --- a/packages/icons/src/svgs/sushiswap-colorful.svg +++ b/packages/icons/src/svgs/sushiswap-colorful.svg @@ -1,54 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + + + + + + + + diff --git a/packages/icons/src/svgs/wbtc-circle-colorful.svg b/packages/icons/src/svgs/wbtc-circle-colorful.svg index 33735d5c7..ff4a54280 100644 --- a/packages/icons/src/svgs/wbtc-circle-colorful.svg +++ b/packages/icons/src/svgs/wbtc-circle-colorful.svg @@ -1,26 +1,20 @@ - + - - - - - - - - - - - - - + + + + + + +