From 10c2c7fd2eb86c77ece715aa55e3314f636e6a1e Mon Sep 17 00:00:00 2001 From: Dmitrii Podlesnyi Date: Mon, 11 Mar 2024 16:01:20 +0400 Subject: [PATCH] fix: l2 banner visuals --- assets/icons/l2-swap-dark.svg | 1 + assets/icons/{l2-swap.svg => l2-swap-light.svg} | 0 shared/banners/l2-banner/styles.ts | 10 +++++----- shared/banners/l2-banners/l2-after-stake.tsx | 2 +- shared/banners/l2-banners/l2-after-wrap.tsx | 2 +- shared/banners/l2-banners/l2-wsteth.tsx | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 assets/icons/l2-swap-dark.svg rename assets/icons/{l2-swap.svg => l2-swap-light.svg} (100%) diff --git a/assets/icons/l2-swap-dark.svg b/assets/icons/l2-swap-dark.svg new file mode 100644 index 000000000..cc2d48f44 --- /dev/null +++ b/assets/icons/l2-swap-dark.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/l2-swap.svg b/assets/icons/l2-swap-light.svg similarity index 100% rename from assets/icons/l2-swap.svg rename to assets/icons/l2-swap-light.svg diff --git a/shared/banners/l2-banner/styles.ts b/shared/banners/l2-banner/styles.ts index 853198690..05d995396 100644 --- a/shared/banners/l2-banner/styles.ts +++ b/shared/banners/l2-banner/styles.ts @@ -1,6 +1,7 @@ import styled, { css } from 'styled-components'; import { Button, Link } from '@lidofinance/lido-ui'; -import Icons from 'assets/icons/l2-swap.svg'; +import IconsLight from 'assets/icons/l2-swap-light.svg'; +import IconsDark from 'assets/icons/l2-swap-dark.svg'; import { LocalLink } from 'shared/components/local-link'; export const Wrapper = styled.div` @@ -45,13 +46,12 @@ export const Wrapper = styled.div` } `; -export const L2Icons = styled.img.attrs({ - src: Icons, - alt: '', -})` +export const L2Icons = styled.div` display: block; width: 188px; height: 32px; + background-image: url(${({ theme }) => + theme.name === 'dark' ? IconsDark : IconsLight}); `; export const FooterWrap = styled.div` diff --git a/shared/banners/l2-banners/l2-after-stake.tsx b/shared/banners/l2-banners/l2-after-stake.tsx index 1ac1265d4..40e207669 100644 --- a/shared/banners/l2-banners/l2-after-stake.tsx +++ b/shared/banners/l2-banners/l2-after-stake.tsx @@ -11,7 +11,7 @@ export const L2AfterStake: React.FC = () => { text={ <> Learn about Lido on L2 opportunities and enjoy various - opportunities in DeFi. + opportunities in DeFi } buttonText="Learn more" diff --git a/shared/banners/l2-banners/l2-after-wrap.tsx b/shared/banners/l2-banners/l2-after-wrap.tsx index 6738f36fc..03049e73b 100644 --- a/shared/banners/l2-banners/l2-after-wrap.tsx +++ b/shared/banners/l2-banners/l2-after-wrap.tsx @@ -13,7 +13,7 @@ export const L2AfterWrap = () => { text={ <> Learn about DeFi opportunities using wstETH across multiple L2 - networks. + networks } buttonText="Learn more" diff --git a/shared/banners/l2-banners/l2-wsteth.tsx b/shared/banners/l2-banners/l2-wsteth.tsx index 0787c3f51..ab10c393c 100644 --- a/shared/banners/l2-banners/l2-wsteth.tsx +++ b/shared/banners/l2-banners/l2-wsteth.tsx @@ -23,7 +23,7 @@ export const L2Wsteth = ({ matomoEventLink }: L2WstethProps) => { text={ <> Enjoy lower gas fees and DeFi opportunities using wstETH - across multiple L2 networks. + across multiple L2 networks } />