mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-15 14:11:02 +00:00
2.12.1 (#718)
This commit is contained in:
@@ -6,7 +6,7 @@ import type { IdentityProps as Props, Props as ComponentProps } from './types';
|
||||
|
||||
import React from 'react';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import styled from 'styled-components';
|
||||
import styledComponents from 'styled-components';
|
||||
|
||||
import { ICON_DEFAULT_HOST, settings } from '@polkadot/ui-settings';
|
||||
import { isHex, isU8a, u8aToHex } from '@polkadot/util';
|
||||
@@ -14,6 +14,16 @@ import { decodeAddress, encodeAddress, ethereumEncode } from '@polkadot/util-cry
|
||||
|
||||
import { Beachball, Empty, Ethereum, Jdenticon, Polkadot } from './icons';
|
||||
|
||||
// In styled-components v6, there is a named export which can be used
|
||||
// directly, i.e. "import { styled } from ..." with no more magic. Until
|
||||
// such time the cjs vs esm import here is problematic, so we hack around
|
||||
// the various shapes below
|
||||
const styled = (
|
||||
(styledComponents as unknown as { styled: typeof styledComponents }).styled ||
|
||||
(styledComponents as unknown as { default: typeof styledComponents }).default ||
|
||||
styledComponents
|
||||
);
|
||||
|
||||
const Fallback = Beachball;
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -5,7 +5,17 @@ import type { Props } from '../types';
|
||||
|
||||
import makeBlockie from 'ethereum-blockies-base64';
|
||||
import React, { useMemo } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import styledComponents from 'styled-components';
|
||||
|
||||
// In styled-components v6, there is a named export which can be used
|
||||
// directly, i.e. "import { styled } from ..." with no more magic. Until
|
||||
// such time the cjs vs esm import here is problematic, so we hack around
|
||||
// the various shapes below
|
||||
const styled = (
|
||||
(styledComponents as unknown as { styled: typeof styledComponents }).styled ||
|
||||
(styledComponents as unknown as { default: typeof styledComponents }).default ||
|
||||
styledComponents
|
||||
);
|
||||
|
||||
interface ImgProps {
|
||||
size: number;
|
||||
|
||||
Reference in New Issue
Block a user