Skip to content

Commit 737c35a

Browse files
authored
Merge pull request #58 from meriadec/fix-invalid-dom-attribute
fix: prevent `hasNetwork` prop from being forwarded to DOM
2 parents 33ada70 + 6efdf65 commit 737c35a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ledgerhq/crypto-icons",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Crypto icons by Ledger",
55
"license": "MIT",
66
"main": "dist/index.js",

lib/src/components/CryptoIcon/CryptoIcon.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import FallbackIcon from '../FallbackIcon/FallbackIcon';
55
import IconWrapper, { RoundedIcon, Skeleton } from '../IconWrapper/IconWrapper';
66
import { CryptoIconProps } from './CryptoIcon.types';
77

8-
const Icon = styled(RoundedIcon)<{ hasNetwork: boolean }>`
8+
const Icon = styled(RoundedIcon)<{ $hasNetwork: boolean }>`
99
height: 100%;
1010
width: 100%;
11-
${({ hasNetwork }) =>
12-
hasNetwork
11+
${({ $hasNetwork }) =>
12+
$hasNetwork
1313
? 'mask-image: radial-gradient(circle closest-side at 81.5% 81.5%, transparent 125%, white 130%);'
1414
: ''}
1515
`;
@@ -36,7 +36,7 @@ const CryptoIcon: FC<CryptoIconProps> = ({
3636
return (
3737
<IconWrapper size={size} theme={theme}>
3838
{iconUrl ? (
39-
<Icon theme={theme} src={iconUrl} alt={ticker} hasNetwork={!!networkUrl} />
39+
<Icon theme={theme} src={iconUrl} alt={ticker} $hasNetwork={!!networkUrl} />
4040
) : (
4141
<FallbackIcon ticker={ticker} size={size} />
4242
)}

0 commit comments

Comments
 (0)