Files
pezkuwi-ui/packages/react-identicon/src/icons/Ethereum.tsx
T
pezkuwichain d1cd13072f Rebrand: polkadot → pezkuwi
- Updated all package references
- Fixed react-identicon and related packages
- Version 3.16.8
2026-01-07 02:35:24 +03:00

38 lines
800 B
TypeScript

// Copyright 2017-2025 @pezkuwi/react-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Props } from '../types.js';
import makeBlockie from 'ethereum-blockies-base64';
import React, { useMemo } from 'react';
import { styled } from '../styled.js';
interface ImgProps {
size: number;
}
function Identicon ({ address, className = '', size, style = {} }: Props): React.ReactElement<Props> {
const imgSrc = useMemo(
() => makeBlockie(address),
[address]
);
return (
<StyledImg
className={className}
size={size}
src={imgSrc}
style={style}
/>
);
}
const StyledImg = styled.img<ImgProps>(({ size }) => `
display: block;
height: ${size}px;
width: ${size}px;
`);
export const Ethereum = React.memo(Identicon);