Skip to content

Commit

Permalink
bugfix(LIVE-8841): wrap llm icon with a ccontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
cng-ledger committed Aug 2, 2023
1 parent 621495b commit e87b5c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -11,7 +12,11 @@ export type Props = {

const ProviderIcon = ({ name, size = "S", boxed = true }: Props): JSX.Element | null => {
const iconUrl = getProviderIconUrl({ boxed, name });
return <Styles.Icon uri={iconUrl} size={size} />;
return (
<Styles.Contianer size={size}>
<SvgUri uri={iconUrl} />
</Styles.Contianer>
);
};

export default ProviderIcon;
4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/src/components/ProviderIcon/styles.ts
Original file line number Diff line number Diff line change
@@ -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)<StyledIconProps>`
export const Contianer = styled(View)<StyledIconProps>`
border-radius: 8px;
width: ${({ size }) => ProviderIconSizes[size]}px;
height: ${({ size }) => ProviderIconSizes[size]}px;
Expand Down

0 comments on commit e87b5c9

Please sign in to comment.