From 0f54c32b6e4ec496b445dcd01310093f0850a1c1 Mon Sep 17 00:00:00 2001 From: Chuck Ng Date: Wed, 2 Aug 2023 19:18:33 +0100 Subject: [PATCH 1/4] bugfix(LIVE-8841): default icon to boxed bugfix(LIVE-8841): wrap llm icon with a ccontainer bugfix(LIVE-8841): use svguri instead changes to svg itself has been made to ledger-live-asset repo --- .../src/renderer/components/ProviderIcon/index.tsx | 2 +- apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ledger-live-desktop/src/renderer/components/ProviderIcon/index.tsx b/apps/ledger-live-desktop/src/renderer/components/ProviderIcon/index.tsx index ce26016f28b8..2897439a3315 100644 --- a/apps/ledger-live-desktop/src/renderer/components/ProviderIcon/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/ProviderIcon/index.tsx @@ -13,7 +13,7 @@ export type Props = { const ProviderIcon = ({ name, size = "S", - boxed = false, + boxed = true, alt = `${name} icon`, }: Props): JSX.Element | null => { const iconUrl = getProviderIconUrl({ boxed, name }); diff --git a/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx b/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx index 5bf88a8ca8f0..e071d94466d6 100644 --- a/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx +++ b/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { getProviderIconUrl } from "@ledgerhq/live-common/icons/providers/providers"; import { ProviderIconSize } from "@ledgerhq/live-common/icons/providers/sizes"; -import * as Styles from "./styles"; +import * as Styles from "./styles";; export type Props = { name: string; @@ -9,7 +9,7 @@ export type Props = { boxed?: boolean; }; -const ProviderIcon = ({ name, size = "S", boxed = false }: Props): JSX.Element | null => { +const ProviderIcon = ({ name, size = "S", boxed = true }: Props): JSX.Element | null => { const iconUrl = getProviderIconUrl({ boxed, name }); return ; }; From 621495b5e23b9affd72318787d726ab4227ae394 Mon Sep 17 00:00:00 2001 From: Chuck Ng Date: Wed, 2 Aug 2023 21:24:09 +0100 Subject: [PATCH 2/4] bugfix(LIVE-8841): use boxed mode for all provider icons --- .../renderer/families/ethereum/StakeFlowModal/StakingIcon.tsx | 2 +- .../src/renderer/screens/exchange/Swap2/Form/Rates/Rate.tsx | 2 +- apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/ledger-live-desktop/src/renderer/families/ethereum/StakeFlowModal/StakingIcon.tsx b/apps/ledger-live-desktop/src/renderer/families/ethereum/StakeFlowModal/StakingIcon.tsx index b26e4dd50dcd..ea9c62668ee2 100644 --- a/apps/ledger-live-desktop/src/renderer/families/ethereum/StakeFlowModal/StakingIcon.tsx +++ b/apps/ledger-live-desktop/src/renderer/families/ethereum/StakeFlowModal/StakingIcon.tsx @@ -46,7 +46,7 @@ export function StakingIcon({ icon }: Props) { if (iconType === "provider") { return ( - + ); } diff --git a/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/Rates/Rate.tsx b/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/Rates/Rate.tsx index 17bc69942c76..8bade3be8e44 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/Rates/Rate.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/exchange/Swap2/Form/Rates/Rate.tsx @@ -59,7 +59,7 @@ function Rate({ > {icon && ( - + )} diff --git a/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx b/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx index e071d94466d6..d2f3d41fece2 100644 --- a/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx +++ b/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { getProviderIconUrl } from "@ledgerhq/live-common/icons/providers/providers"; import { ProviderIconSize } from "@ledgerhq/live-common/icons/providers/sizes"; -import * as Styles from "./styles";; +import * as Styles from "./styles"; export type Props = { name: string; From e87b5c9617bf36e179a88deb2fab59c181db3e65 Mon Sep 17 00:00:00 2001 From: Chuck Ng Date: Wed, 2 Aug 2023 21:30:32 +0100 Subject: [PATCH 3/4] bugfix(LIVE-8841): wrap llm icon with a ccontainer --- .../src/components/ProviderIcon/index.tsx | 7 ++++++- .../src/components/ProviderIcon/styles.ts | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx b/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx index d2f3d41fece2..f7af0195cbe2 100644 --- a/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx +++ b/apps/ledger-live-mobile/src/components/ProviderIcon/index.tsx @@ -2,6 +2,7 @@ import React from "react"; import { getProviderIconUrl } from "@ledgerhq/live-common/icons/providers/providers"; import { ProviderIconSize } from "@ledgerhq/live-common/icons/providers/sizes"; import * as Styles from "./styles"; +import { SvgUri } from "react-native-svg"; export type Props = { name: string; @@ -11,7 +12,11 @@ export type Props = { const ProviderIcon = ({ name, size = "S", boxed = true }: Props): JSX.Element | null => { const iconUrl = getProviderIconUrl({ boxed, name }); - return ; + return ( + + + + ); }; export default ProviderIcon; diff --git a/apps/ledger-live-mobile/src/components/ProviderIcon/styles.ts b/apps/ledger-live-mobile/src/components/ProviderIcon/styles.ts index ccc809da3c4d..d9721b82ad1d 100644 --- a/apps/ledger-live-mobile/src/components/ProviderIcon/styles.ts +++ b/apps/ledger-live-mobile/src/components/ProviderIcon/styles.ts @@ -1,12 +1,12 @@ import styled from "styled-components/native"; -import { SvgUri } from "react-native-svg"; import { ProviderIconSize, ProviderIconSizes } from "@ledgerhq/live-common/icons/providers/sizes"; +import { View } from "react-native"; type StyledIconProps = { size: ProviderIconSize; }; -export const Icon = styled(SvgUri)` +export const Contianer = styled(View)` border-radius: 8px; width: ${({ size }) => ProviderIconSizes[size]}px; height: ${({ size }) => ProviderIconSizes[size]}px; From ec75bf3fa6f3506fcd96bafca87967b0a711f62f Mon Sep 17 00:00:00 2001 From: Chuck Ng Date: Thu, 3 Aug 2023 13:06:37 +0100 Subject: [PATCH 4/4] chore(LIVE-8841): add changeset --- .changeset/beige-needles-sip.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/beige-needles-sip.md diff --git a/.changeset/beige-needles-sip.md b/.changeset/beige-needles-sip.md new file mode 100644 index 000000000000..074863d9376e --- /dev/null +++ b/.changeset/beige-needles-sip.md @@ -0,0 +1,6 @@ +--- +"ledger-live-desktop": patch +"live-mobile": patch +--- + +Default ProviderIcon to boxed mode in order to support light and dark mode out of the box