From 41a38e953b17075b5ab7bec307c147d8f74b7501 Mon Sep 17 00:00:00 2001 From: male-gal Date: Tue, 29 Aug 2023 14:32:01 +0200 Subject: [PATCH] feat(IconsUI/ReactUI): ProviderIcons removal from Design System --- .changeset/small-fishes-flow.md | 6 + libs/ui/packages/icons/scripts/buildLegacy.js | 75 ----------- .../src/additionalIcons/Providers/AAVE.svg | 3 - .../additionalIcons/Providers/BTCDirect.svg | 3 - .../src/additionalIcons/Providers/Baanx.svg | 10 -- .../src/additionalIcons/Providers/Binance.svg | 17 --- .../src/additionalIcons/Providers/CIC.svg | 11 -- .../additionalIcons/Providers/Changelly.svg | 3 - .../additionalIcons/Providers/CoinGecko.svg | 19 --- .../src/additionalIcons/Providers/Coinify.svg | 10 -- .../additionalIcons/Providers/Compound.svg | 3 - .../additionalIcons/Providers/Deversifi.svg | 3 - .../src/additionalIcons/Providers/FTX.svg | 18 --- .../src/additionalIcons/Providers/FTXUS.svg | 18 --- .../src/additionalIcons/Providers/Kiln.svg | 4 - .../src/additionalIcons/Providers/Lido.svg | 4 - .../additionalIcons/Providers/LoopiPay.svg | 4 - .../additionalIcons/Providers/Mercuryo.svg | 10 -- .../src/additionalIcons/Providers/Moonpay.svg | 4 - .../src/additionalIcons/Providers/OneInch.svg | 23 ---- .../src/additionalIcons/Providers/Opensea.svg | 4 - .../src/additionalIcons/Providers/POAP.svg | 19 --- .../additionalIcons/Providers/PancakeSwap.svg | 14 -- .../additionalIcons/Providers/Paraswap.svg | 11 -- .../additionalIcons/Providers/Rainbow.me.svg | 29 ----- .../src/additionalIcons/Providers/Ramp.svg | 5 - .../src/additionalIcons/Providers/Rarible.svg | 3 - .../src/additionalIcons/Providers/Simplex.svg | 3 - .../additionalIcons/Providers/SushiSwap.svg | 30 ----- .../src/additionalIcons/Providers/Transak.svg | 3 - .../src/additionalIcons/Providers/Wyre.svg | 14 -- .../src/additionalIcons/Providers/Zerion.svg | 11 -- .../src/additionalIcons/Providers/banxa.svg | 14 -- .../additionalIcons/Providers/bitrefill.svg | 3 - .../additionalIcons/ProvidersBoxed/aave.svg | 10 -- .../additionalIcons/ProvidersBoxed/baanx.svg | 11 -- .../additionalIcons/ProvidersBoxed/banxa.svg | 15 --- .../ProvidersBoxed/binance.svg | 18 --- .../ProvidersBoxed/bitrefill.svg | 4 - .../ProvidersBoxed/btcdirect.svg | 4 - .../ProvidersBoxed/changelly.svg | 4 - .../additionalIcons/ProvidersBoxed/cic.svg | 12 -- .../ProvidersBoxed/coingecko.svg | 32 ----- .../ProvidersBoxed/coinify.svg | 11 -- .../ProvidersBoxed/compound.svg | 4 - .../ProvidersBoxed/deversifi.svg | 4 - .../additionalIcons/ProvidersBoxed/ftx-us.svg | 31 ----- .../additionalIcons/ProvidersBoxed/ftx.svg | 31 ----- .../additionalIcons/ProvidersBoxed/juno.svg | 12 -- .../additionalIcons/ProvidersBoxed/kiln.svg | 5 - .../ProvidersBoxed/ledger black.svg | 11 -- .../ProvidersBoxed/ledger card.svg | 25 ---- .../ProvidersBoxed/ledger white.svg | 11 -- .../additionalIcons/ProvidersBoxed/lido.svg | 5 - .../ProvidersBoxed/loopipay.svg | 12 -- .../ProvidersBoxed/mercuryo.svg | 11 -- .../ProvidersBoxed/moonpay.svg | 5 - .../ProvidersBoxed/oneinch.svg | 24 ---- .../ProvidersBoxed/opensea.svg | 5 - .../ProvidersBoxed/pancakeswap.svg | 19 --- .../ProvidersBoxed/paraswap.svg | 12 -- .../additionalIcons/ProvidersBoxed/poap.svg | 20 --- .../ProvidersBoxed/rainbowme.svg | 29 ----- .../additionalIcons/ProvidersBoxed/ramp.svg | 20 --- .../ProvidersBoxed/rarible.svg | 4 - .../ProvidersBoxed/sardine.svg | 11 -- .../ProvidersBoxed/simplex.svg | 4 - .../ProvidersBoxed/skeleton.svg | 3 - .../ProvidersBoxed/sushiswap.svg | 35 ----- .../ProvidersBoxed/transak.svg | 15 --- .../additionalIcons/ProvidersBoxed/wyre.svg | 27 ---- .../additionalIcons/ProvidersBoxed/zerion.svg | 12 -- .../components/asorted/Icon/ProviderIcon.tsx | 73 ----------- .../asorted/Icon/Providers.stories.tsx | 121 ------------------ .../src/components/asorted/Icon/index.tsx | 1 - .../react/src/components/asorted/index.ts | 2 +- 76 files changed, 7 insertions(+), 1129 deletions(-) create mode 100644 .changeset/small-fishes-flow.md delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/AAVE.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/BTCDirect.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Baanx.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Binance.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/CIC.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Changelly.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/CoinGecko.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Coinify.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Compound.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Deversifi.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/FTX.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/FTXUS.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Kiln.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Lido.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/LoopiPay.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Mercuryo.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Moonpay.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/OneInch.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Opensea.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/POAP.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/PancakeSwap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Paraswap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Rainbow.me.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Ramp.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Rarible.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Simplex.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/SushiSwap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Transak.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Wyre.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/Zerion.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/banxa.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/Providers/bitrefill.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/aave.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/baanx.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/banxa.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/binance.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/bitrefill.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/btcdirect.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/changelly.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/cic.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coingecko.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coinify.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/compound.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/deversifi.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx-us.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/juno.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/kiln.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger black.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger card.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger white.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/lido.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/loopipay.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/mercuryo.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/moonpay.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/oneinch.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/opensea.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/pancakeswap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/paraswap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/poap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rainbowme.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ramp.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rarible.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sardine.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/simplex.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/skeleton.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sushiswap.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/transak.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/wyre.svg delete mode 100644 libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/zerion.svg delete mode 100644 libs/ui/packages/react/src/components/asorted/Icon/ProviderIcon.tsx delete mode 100644 libs/ui/packages/react/src/components/asorted/Icon/Providers.stories.tsx diff --git a/.changeset/small-fishes-flow.md b/.changeset/small-fishes-flow.md new file mode 100644 index 000000000000..5f7795dc77d8 --- /dev/null +++ b/.changeset/small-fishes-flow.md @@ -0,0 +1,6 @@ +--- +"@ledgerhq/icons-ui": patch +"@ledgerhq/react-ui": patch +--- + +Removal of ProviderIcons from UILib diff --git a/libs/ui/packages/icons/scripts/buildLegacy.js b/libs/ui/packages/icons/scripts/buildLegacy.js index 27b81fe9a17d..eaa250a42fd4 100644 --- a/libs/ui/packages/icons/scripts/buildLegacy.js +++ b/libs/ui/packages/icons/scripts/buildLegacy.js @@ -9,7 +9,6 @@ const svgr = require("@svgr/core").default; const rootDir = path.join(__dirname, "..", "src"); const reactDir = path.join(rootDir, "reactLegacy"); const nativeDir = path.join(rootDir, "nativeLegacy"); -const additionalIconsDir = path.join(__dirname, "..", "src", "additionalIcons"); // Create folders if needed if (!fs.existsSync(reactDir)) { @@ -67,31 +66,6 @@ function reactTemplate({ template }, _, { imports, interfaces, componentName, __ `; } -// Additional Icons component template -function reactAdditionalTemplate( - { template }, - _, - { imports, interfaces, componentName, __, jsx, exports }, -) { - const plugins = ["typescript"]; - const tpl = template.smart({ plugins }); - - return tpl.ast` - ${imports} - import Svg from "../StyledSvg" - - type Props = { size?: number | string; width?: number | string; height?: number | string; }; - - ${interfaces} - - function ${componentName} ({ size, width, height }: Props): JSX.Element { - return ${jsx}; - } - - ${exports} - `; -} - // Component template function reactNativeTemplate( { template }, @@ -234,52 +208,3 @@ glob(`${rootDir}/svg-legacy/**/*.svg`, (err, icons) => { } }); }); -//====== create additional icons ===== - -// get subfolders -const folders = fs.readdirSync(additionalIconsDir); - -folders.forEach(folder => { - // Create target folders - const folderName = `${folder}`; - if (!fs.existsSync(`${reactDir}/${folderName}`)) { - fs.mkdirSync(`${reactDir}/${folderName}`); - } - - fs.writeFileSync(`${reactDir}/${folderName}/index.ts`, "", { - flag: "w", - encoding: "utf-8", - }); - - glob(`${additionalIconsDir}/${folder}/*.svg`, (err, icons) => { - icons.forEach(icon => { - let name = camelcase(path.basename(icon, ".svg"), { pascalCase: true }); - if (!isNaN(name.charAt(0))) name = `_${name}`; // fix variable name leading with a numerical value - - const exportString = `export { default as ${name} } from "./${name}";\n`; - fs.appendFileSync(`${reactDir}/${folderName}/index.ts`, exportString, "utf-8"); - - const svg = fs.readFileSync(icon, "utf-8"); - - const options = { - plugins: ["@svgr/plugin-svgo", "@svgr/plugin-jsx"], - expandProps: false, - componentName: name, - svgProps: { - height: "{height || size}", - width: "{width || size}", - }, - svgoConfig: { - plugins: [{ removeXMLNS: true, removeViewBox: false }], - }, - }; - convert( - svg, - { ...options, template: reactAdditionalTemplate }, - { componentName: name }, - `${reactDir}/${folderName}/${name}.tsx`, - true, - ); - }); - }); -}); diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/AAVE.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/AAVE.svg deleted file mode 100644 index 188ad7829913..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/AAVE.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/BTCDirect.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/BTCDirect.svg deleted file mode 100644 index 2e479101ffff..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/BTCDirect.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Baanx.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Baanx.svg deleted file mode 100644 index 976841019fed..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Baanx.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Binance.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Binance.svg deleted file mode 100644 index 522763f081f1..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Binance.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/CIC.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/CIC.svg deleted file mode 100644 index 588253364c3e..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/CIC.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Changelly.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Changelly.svg deleted file mode 100644 index 2c9db50659f8..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Changelly.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/CoinGecko.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/CoinGecko.svg deleted file mode 100644 index ee2f53e45881..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/CoinGecko.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Coinify.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Coinify.svg deleted file mode 100644 index 6c5ceb9e2533..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Coinify.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Compound.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Compound.svg deleted file mode 100644 index d2f5319f1972..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Compound.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Deversifi.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Deversifi.svg deleted file mode 100644 index d8e04c0e8742..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Deversifi.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/FTX.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/FTX.svg deleted file mode 100644 index 39512de56497..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/FTX.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/FTXUS.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/FTXUS.svg deleted file mode 100644 index f2e5922c788b..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/FTXUS.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Kiln.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Kiln.svg deleted file mode 100644 index 066be253a144..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Kiln.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Lido.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Lido.svg deleted file mode 100644 index e0e59a44309a..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Lido.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/LoopiPay.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/LoopiPay.svg deleted file mode 100644 index 9f7d1a72dc30..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/LoopiPay.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Mercuryo.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Mercuryo.svg deleted file mode 100644 index c75e9765de59..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Mercuryo.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Moonpay.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Moonpay.svg deleted file mode 100644 index 58ffa652f0cc..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Moonpay.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/OneInch.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/OneInch.svg deleted file mode 100644 index 38542a8064e1..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/OneInch.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Opensea.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Opensea.svg deleted file mode 100644 index c6b1e81aad52..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Opensea.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/POAP.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/POAP.svg deleted file mode 100644 index 9b86da769f20..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/POAP.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/PancakeSwap.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/PancakeSwap.svg deleted file mode 100644 index b287dc8fca50..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/PancakeSwap.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Paraswap.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Paraswap.svg deleted file mode 100644 index 9d473f3c87e5..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Paraswap.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Rainbow.me.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Rainbow.me.svg deleted file mode 100644 index d8047dc46e53..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Rainbow.me.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Ramp.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Ramp.svg deleted file mode 100644 index b72a58b86839..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Ramp.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Rarible.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Rarible.svg deleted file mode 100644 index d6d4655c6305..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Rarible.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Simplex.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Simplex.svg deleted file mode 100644 index 3f85d4cb4ff8..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Simplex.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/SushiSwap.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/SushiSwap.svg deleted file mode 100644 index 26bd5609fb25..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/SushiSwap.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Transak.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Transak.svg deleted file mode 100644 index c0ebfd75aa9b..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Transak.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Wyre.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Wyre.svg deleted file mode 100644 index 122fc82d1d21..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Wyre.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/Zerion.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/Zerion.svg deleted file mode 100644 index c11274ecb4e5..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/Zerion.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/banxa.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/banxa.svg deleted file mode 100644 index a4b94e7c164a..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/banxa.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/Providers/bitrefill.svg b/libs/ui/packages/icons/src/additionalIcons/Providers/bitrefill.svg deleted file mode 100644 index b642e39eac63..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/Providers/bitrefill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/aave.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/aave.svg deleted file mode 100644 index 0a25ce362709..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/aave.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/baanx.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/baanx.svg deleted file mode 100644 index 430fe219865d..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/baanx.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/banxa.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/banxa.svg deleted file mode 100644 index 93584cf8bf68..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/banxa.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/binance.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/binance.svg deleted file mode 100644 index 22600df850a0..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/binance.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/bitrefill.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/bitrefill.svg deleted file mode 100644 index 332bed00a502..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/bitrefill.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/btcdirect.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/btcdirect.svg deleted file mode 100644 index 528c11b49693..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/btcdirect.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/changelly.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/changelly.svg deleted file mode 100644 index 8623ead27d2e..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/changelly.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/cic.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/cic.svg deleted file mode 100644 index 4e84f42d6c89..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/cic.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coingecko.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coingecko.svg deleted file mode 100644 index e94107502c7a..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coingecko.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coinify.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coinify.svg deleted file mode 100644 index 9c7211722cab..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/coinify.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/compound.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/compound.svg deleted file mode 100644 index f79b26c1f9a3..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/compound.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/deversifi.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/deversifi.svg deleted file mode 100644 index 2503f80908f2..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/deversifi.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx-us.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx-us.svg deleted file mode 100644 index 6844b5b7dd44..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx-us.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx.svg deleted file mode 100644 index 0a96c1f2e1e0..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ftx.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/juno.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/juno.svg deleted file mode 100644 index b020a81c5d24..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/juno.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/kiln.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/kiln.svg deleted file mode 100644 index c45e913a997d..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/kiln.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger black.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger black.svg deleted file mode 100644 index 673de6e3813a..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger black.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger card.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger card.svg deleted file mode 100644 index c9672aad6408..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger card.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger white.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger white.svg deleted file mode 100644 index d42d313a9302..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ledger white.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/lido.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/lido.svg deleted file mode 100644 index 4184fecb467c..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/lido.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/loopipay.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/loopipay.svg deleted file mode 100644 index cbab3da8aeff..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/loopipay.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/mercuryo.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/mercuryo.svg deleted file mode 100644 index f7301253d43a..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/mercuryo.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/moonpay.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/moonpay.svg deleted file mode 100644 index 8b9d50724ae2..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/moonpay.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/oneinch.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/oneinch.svg deleted file mode 100644 index 81570c11e5c8..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/oneinch.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/opensea.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/opensea.svg deleted file mode 100644 index 8112fcfa1a62..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/opensea.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/pancakeswap.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/pancakeswap.svg deleted file mode 100644 index 3173e575eae0..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/pancakeswap.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/paraswap.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/paraswap.svg deleted file mode 100644 index bce7c7ad7386..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/paraswap.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/poap.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/poap.svg deleted file mode 100644 index 85fdcce1978e..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/poap.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rainbowme.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rainbowme.svg deleted file mode 100644 index 5d6db061d239..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rainbowme.svg +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ramp.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ramp.svg deleted file mode 100644 index bbe20794d9e6..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/ramp.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rarible.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rarible.svg deleted file mode 100644 index 750afa2751d9..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/rarible.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sardine.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sardine.svg deleted file mode 100644 index 61b19bb617ca..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sardine.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/simplex.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/simplex.svg deleted file mode 100644 index 415250db981b..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/simplex.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/skeleton.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/skeleton.svg deleted file mode 100644 index 2216e32c8429..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/skeleton.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sushiswap.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sushiswap.svg deleted file mode 100644 index 9a5a9e08dc6d..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/sushiswap.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/transak.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/transak.svg deleted file mode 100644 index 78a514123295..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/transak.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/wyre.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/wyre.svg deleted file mode 100644 index b537abc673cd..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/wyre.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/zerion.svg b/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/zerion.svg deleted file mode 100644 index 8138cf196345..000000000000 --- a/libs/ui/packages/icons/src/additionalIcons/ProvidersBoxed/zerion.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/libs/ui/packages/react/src/components/asorted/Icon/ProviderIcon.tsx b/libs/ui/packages/react/src/components/asorted/Icon/ProviderIcon.tsx deleted file mode 100644 index ebcdb0ced50d..000000000000 --- a/libs/ui/packages/react/src/components/asorted/Icon/ProviderIcon.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import * as providers from "@ledgerhq/icons-ui/reactLegacy/Providers/index"; -import * as providersBoxed from "@ledgerhq/icons-ui/reactLegacy/ProvidersBoxed/index"; - -import React from "react"; -import FlexBox from "../../layout/Flex"; - -export const sizes = { - XXS: 16, - XS: 24, - S: 32, - M: 40, - L: 48, - XL: 56, -}; - -export type ProviderSizes = keyof typeof sizes; - -export type Props = { - name: string; - size?: ProviderSizes; - boxed?: boolean; -}; - -export const iconNames = Array.from( - Object.keys(providers).reduce((set, rawKey) => { - const key = rawKey - .replace(/(.+)(Regular|Light|UltraLight|Thin|Medium)+$/g, "$1") - .replace(/(.+)(Ultra)+$/g, "$1") - .replace(/^_/, ""); - if (!set.has(key)) set.add(key); - return set; - }, new Set()), -); - -export type IconGetterProps = { - search: string; - object: Record; -}; - -const getIconCaseInsensitive = ({ search, object }: IconGetterProps) => { - const asLower = search.toLowerCase(); - const key = Object.keys(object).find(key => key.toLowerCase().replace(/^_/, "") === asLower); - return key ? object[key] : null; -}; - -const ProviderIcon = ({ name, size = "S", boxed = false }: Props): JSX.Element | null => { - const maybeIconName = `${name}`; - - if (boxed) { - const BoxedComponent = getIconCaseInsensitive({ - search: maybeIconName, - object: providersBoxed, - }) as React.ElementType; - if (BoxedComponent) { - return ( - - - - ); - } - return null; - } - const Component = getIconCaseInsensitive({ - search: maybeIconName, - object: providers, - }) as React.ElementType; - if (Component) { - return ; - } - return null; -}; - -export default ProviderIcon; diff --git a/libs/ui/packages/react/src/components/asorted/Icon/Providers.stories.tsx b/libs/ui/packages/react/src/components/asorted/Icon/Providers.stories.tsx deleted file mode 100644 index 53156b3a43cd..000000000000 --- a/libs/ui/packages/react/src/components/asorted/Icon/Providers.stories.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import React, { useState } from "react"; -import styled from "styled-components"; -import ProviderIcon, { - iconNames, - Props as ProviderIconProps, - sizes as providerSizes, -} from "./ProviderIcon"; -import { Text, SearchInput, Flex, Grid } from "../../.."; - -const ScrollArea = styled(Grid)` - flex: 1; - height: auto; - ${p => p.theme.overflow.y}; -`; - -const Container = styled(Flex).attrs({ - flex: 1, - flexDirection: "column", - p: 4, -})` - overflow: hidden; - height: calc(100vh - 4em); -`; - -const IconContainer = styled(Flex).attrs<{ active?: boolean }>({ - flexDirection: "column", - justifyContent: "flex-end", - alignItems: "center", - p: 4, -})<{ active?: boolean }>` - ${p => (p.active ? `background-color: ${p.theme.colors.neutral.c20};` : ``)} - border-radius: 4px; - height: 100px; -`; - -const Bold = styled.b` - color: ${p => p.theme.colors.primary.c80}; -`; - -const Story = { - title: "Asorted/Icons/ProviderIcons", - argTypes: { - size: { - type: "enum", - description: "Icon size", - defaultValue: "L", - control: { - options: Object.keys(providerSizes), - }, - }, - boxed: { - type: "boolean", - description: "Boxed", - defaultValue: false, - }, - name: { - type: "string", - // defaultValue: "Aave", - // description: "[Only for single icon], Icon name", - // control: { - // options: iconNames, - // control: { - // type: "select", - // }, - // }, - }, - }, -}; -export default Story; - -const ListTemplate = (args: ProviderIconProps) => { - const [search, setSearch] = useState(""); - const s = search.toLowerCase(); - const regexp = new RegExp(s, "i"); - - return ( - - - - {iconNames - .sort((a: string, b: string) => { - return s ? b.toLowerCase().indexOf(s) - a.toLowerCase().indexOf(s) : a.localeCompare(b); - }) - .map(name => { - const match = name.match(regexp); - const active = s && match; - const index = match?.index ?? 0; - return ( - - - - - - {active ? ( - <> - {name.substr(0, index)} - {name.substr(index, s.length)} - {name.substr(index + s.length)} - - ) : ( - name - )} - - - ); - })} - - - ); -}; -const FlagTemplate = (args: ProviderIconProps) => { - return ; -}; - -export const List = ListTemplate.bind({}); -export const SingleIcon = FlagTemplate.bind({}); diff --git a/libs/ui/packages/react/src/components/asorted/Icon/index.tsx b/libs/ui/packages/react/src/components/asorted/Icon/index.tsx index 3ad5f8758724..573209ebfb62 100644 --- a/libs/ui/packages/react/src/components/asorted/Icon/index.tsx +++ b/libs/ui/packages/react/src/components/asorted/Icon/index.tsx @@ -3,4 +3,3 @@ import BoxedIcon, { IconBox } from "./BoxedIcon"; export { BoxedIcon, IconBox }; export type { Props } from "./Icon"; export { default as CryptoIcon } from "./CryptoIcon"; -export { default as ProviderIcon } from "./ProviderIcon"; diff --git a/libs/ui/packages/react/src/components/asorted/index.ts b/libs/ui/packages/react/src/components/asorted/index.ts index 7ce50d587c8f..70dcb8fea564 100644 --- a/libs/ui/packages/react/src/components/asorted/index.ts +++ b/libs/ui/packages/react/src/components/asorted/index.ts @@ -1,3 +1,3 @@ export { default as Divider } from "./Divider"; -export { default as Icon, IconBox, BoxedIcon, CryptoIcon, ProviderIcon } from "./Icon"; +export { default as Icon, IconBox, BoxedIcon, CryptoIcon } from "./Icon"; export { default as Text } from "./Text";