mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-22 03:17:58 +00:00
refactor: rename polkadotIcon to pezkuwiIcon and update identicon themes
- Rename polkadot.ts to pezkuwi.ts in ui-shared - Rename polkadotIcon function to pezkuwiIcon - Rename Polkadot.tsx to Pezkuwi.tsx in all identicon packages - Update Components mapping to use pezkuwi theme - Add bizinikiwi theme as substrate replacement - Update IconTheme type definitions - Update Ledger app text to Pezkuwi
This commit is contained in:
@@ -9,14 +9,14 @@ import React from 'react';
|
||||
import { isHex, isU8a, u8aToHex } from '@pezkuwi/util';
|
||||
import { decodeAddress, encodeAddress } from '@pezkuwi/util-crypto';
|
||||
|
||||
import { Empty, Polkadot } from './icons/index.js';
|
||||
import { Empty, Pezkuwi } from './icons/index.js';
|
||||
|
||||
const Fallback = Polkadot;
|
||||
const Fallback = Pezkuwi;
|
||||
|
||||
interface Props {
|
||||
prefix?: Prefix;
|
||||
size?: number;
|
||||
theme?: 'polkadot';
|
||||
theme?: 'pezkuwi';
|
||||
value?: string | Uint8Array | null;
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@ interface State {
|
||||
}
|
||||
|
||||
const DEFAULT_SIZE = 64;
|
||||
const DEFAULT_THEME = 'polkadot';
|
||||
const DEFAULT_THEME = 'pezkuwi';
|
||||
|
||||
const Components: Record<string, React.ComponentType<ComponentProps>> = {
|
||||
polkadot: Polkadot
|
||||
pezkuwi: Pezkuwi
|
||||
};
|
||||
|
||||
export default class IdentityIcon extends React.PureComponent<Props, State> {
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ import React, { useMemo } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import { Circle as SvgCircle, Svg } from 'react-native-svg';
|
||||
|
||||
import { polkadotIcon } from '@pezkuwi/ui-shared';
|
||||
import { pezkuwiIcon } from '@pezkuwi/ui-shared';
|
||||
|
||||
function renderCircle ({ cx, cy, fill, r }: CircleType, key: number): React.ReactNode {
|
||||
return (
|
||||
@@ -24,7 +24,7 @@ function renderCircle ({ cx, cy, fill, r }: CircleType, key: number): React.Reac
|
||||
|
||||
export default function Identicon ({ address, isAlternative = false, size }: Props): React.ReactElement<Props> {
|
||||
const circles = useMemo(
|
||||
() => polkadotIcon(address, { isAlternative }),
|
||||
() => pezkuwiIcon(address, { isAlternative }),
|
||||
[address, isAlternative]
|
||||
);
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as Empty } from './Empty.js';
|
||||
export { default as Polkadot } from './Polkadot.js';
|
||||
export { default as Pezkuwi } from './Pezkuwi.js';
|
||||
|
||||
Reference in New Issue
Block a user