mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-20 02:21:05 +00:00
Bump deps (#751)
This commit is contained in:
@@ -89,7 +89,7 @@ class BaseIcon extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
private getWrapped ({ address, publicKey }: State, { Custom }: Props): React.ReactNode {
|
||||
const { className = '', isAlternative, isHighlight, size = DEFAULT_SIZE, style, theme = settings.icon } = this.props;
|
||||
const { className = '', isAlternative, isHighlight, size = DEFAULT_SIZE, style = {}, theme = settings.icon } = this.props;
|
||||
const Component = !address
|
||||
? Empty
|
||||
: Custom || Components[theme === 'default' ? ICON_DEFAULT_HOST : theme] || Fallback;
|
||||
|
||||
@@ -7,7 +7,7 @@ import React, { useCallback } from 'react';
|
||||
|
||||
import { beachballIcon } from '@polkadot/ui-shared';
|
||||
|
||||
function Identicon ({ address, className = '', size, style }: Props): React.ReactElement<Props> {
|
||||
function Identicon ({ address, className = '', size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const updateElem = useCallback(
|
||||
(node: HTMLDivElement): void => {
|
||||
node && node.appendChild(
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Props } from '../types.js';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
function Identicon ({ className = '', size, style }: Props): React.ReactElement<Props> {
|
||||
function Identicon ({ className = '', size, style = {} }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<svg
|
||||
className={className}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface ImgProps {
|
||||
size: number;
|
||||
}
|
||||
|
||||
function Identicon ({ address, className = '', size, style }: Props): React.ReactElement<Props> {
|
||||
function Identicon ({ address, className = '', size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const imgSrc = useMemo(
|
||||
() => makeBlockie(address),
|
||||
[address]
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Props } from '../types.js';
|
||||
import * as jdenticon from 'jdenticon';
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
function Identicon ({ className = '', publicKey, size, style }: Props): React.ReactElement<Props> {
|
||||
function Identicon ({ className = '', publicKey, size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const html = useMemo(
|
||||
() => ({ __html: jdenticon.toSvg(publicKey.substring(2), size) }),
|
||||
[publicKey, size]
|
||||
|
||||
@@ -35,7 +35,7 @@ function renderCircle ({ cx, cy, fill, r }: Circle, key: number): React.ReactNod
|
||||
);
|
||||
}
|
||||
|
||||
function Identicon ({ address, className = '', isAlternative = false, size, style }: Props): React.ReactElement<Props> {
|
||||
function Identicon ({ address, className = '', isAlternative = false, size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const circles = useMemo(
|
||||
() => polkadotIcon(address, { isAlternative }),
|
||||
[address, isAlternative]
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface BaseProps {
|
||||
|
||||
export interface Props extends BaseProps {
|
||||
address: string;
|
||||
isAlternative?: boolean;
|
||||
isAlternative?: boolean | undefined;
|
||||
className?: string;
|
||||
publicKey: string;
|
||||
size: number;
|
||||
|
||||
@@ -11,11 +11,11 @@ import { styled } from './styled.js';
|
||||
import { createFrames, createImgSize } from './util.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
size?: string | number;
|
||||
className?: string | undefined;
|
||||
size?: string | number | undefined;
|
||||
skipEncoding?: boolean;
|
||||
style?: React.CSSProperties;
|
||||
timerDelay?: number;
|
||||
style?: React.CSSProperties | undefined;
|
||||
timerDelay?: number | undefined;
|
||||
value: Uint8Array;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ function getDataUrl (value: Uint8Array): string {
|
||||
return qr.createDataURL(16, 0);
|
||||
}
|
||||
|
||||
function Display ({ className, size, skipEncoding, style, timerDelay = DEFAULT_FRAME_DELAY, value }: Props): React.ReactElement<Props> | null {
|
||||
function Display ({ className = '', size, skipEncoding, style = {}, timerDelay = DEFAULT_FRAME_DELAY, value }: Props): React.ReactElement<Props> | null {
|
||||
const [{ image }, setFrameState] = useState<FrameState>({ frameIdx: 0, frames: [], image: null, valueHash: null });
|
||||
const timerRef = useRef<TimerState>({ timerDelay, timerId: null });
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ import { styled } from './styled.js';
|
||||
import { createImgSize } from './util.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
className?: string | undefined;
|
||||
delay?: number;
|
||||
onError?: (error: Error) => void;
|
||||
onError?: undefined | ((error: Error) => void);
|
||||
onScan: (data: string) => void;
|
||||
size?: string | number;
|
||||
style?: React.CSSProperties;
|
||||
size?: string | number | undefined;
|
||||
style?: React.CSSProperties | undefined;
|
||||
}
|
||||
|
||||
const DEFAULT_DELAY = 150;
|
||||
@@ -22,7 +22,7 @@ const DEFAULT_ERROR = (error: Error): void => {
|
||||
console.error('@polkadot/react-qr:Scan', error.message);
|
||||
};
|
||||
|
||||
function Scan ({ className, delay = DEFAULT_DELAY, onError = DEFAULT_ERROR, onScan, size, style }: Props): React.ReactElement<Props> {
|
||||
function Scan ({ className = '', delay = DEFAULT_DELAY, onError = DEFAULT_ERROR, onScan, size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const containerStyle = useMemo(
|
||||
() => createImgSize(size),
|
||||
[size]
|
||||
|
||||
@@ -12,7 +12,7 @@ interface ScanType {
|
||||
isAddress: boolean;
|
||||
content: string;
|
||||
genesisHash: string;
|
||||
name?: string;
|
||||
name?: string | undefined;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -28,7 +28,7 @@ export class Base {
|
||||
|
||||
protected _store: KeyringStore;
|
||||
|
||||
protected _genesisHash?: string;
|
||||
protected _genesisHash?: string | undefined;
|
||||
|
||||
protected _genesisHashAdd: string[] = [];
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { KeyringJson, KeyringStore } from '../types.js';
|
||||
export interface SingleAddress {
|
||||
json: KeyringJson;
|
||||
option: KeyringSectionOption;
|
||||
type?: KeypairType;
|
||||
type?: KeypairType | undefined;
|
||||
}
|
||||
|
||||
export interface SubjectInfo {
|
||||
|
||||
@@ -13,7 +13,7 @@ export interface ContractMeta {
|
||||
|
||||
export interface KeyringJson$Meta {
|
||||
contract?: ContractMeta;
|
||||
genesisHash?: string | null;
|
||||
genesisHash?: string | null | undefined;
|
||||
hardwareType?: 'ledger';
|
||||
isHardware?: boolean;
|
||||
isInjected?: boolean;
|
||||
@@ -70,7 +70,7 @@ export interface KeyringStruct {
|
||||
readonly addresses: AddressSubject;
|
||||
readonly contracts: AddressSubject;
|
||||
readonly keyring: BaseKeyringInstance | undefined;
|
||||
readonly genesisHash?: string;
|
||||
readonly genesisHash?: string | undefined;
|
||||
|
||||
addExternal: (publicKey: Uint8Array, meta?: KeyringPair$Meta) => CreateResult;
|
||||
addPair: (pair: KeyringPair, password: string) => CreateResult;
|
||||
|
||||
Reference in New Issue
Block a user