mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-09 20:11:04 +00:00
Move ui-identicon -> react-identicon (#165)
* Move ui-identicon -> react-identicon * ui-identicon import fix * Update README package links * Update doc sidebar links * Adjust react-qr signatures, CHANGELOG
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
# @polkadot/ui-identicon
|
||||
# @polkadot/react-identicon
|
||||
|
||||
A generic identity icon that can render icons based on the theme, be it Substrate or Polkadot
|
||||
|
||||
## Usage Examples
|
||||
|
||||
To install the component, do `yarn add @polkadot/ui-identicon`
|
||||
To install the component, do `yarn add @polkadot/react-identicon`
|
||||
|
||||
Inside a React component, you can now render any account with the associated icon -
|
||||
|
||||
```javascript
|
||||
import Identicon from '@polkadot/ui-identicon';
|
||||
import Identicon from '@polkadot/react-identicon';
|
||||
|
||||
...
|
||||
render () {
|
||||
|
Before Width: | Height: | Size: 851 KiB After Width: | Height: | Size: 851 KiB |
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@polkadot/ui-identicon",
|
||||
"name": "@polkadot/react-identicon",
|
||||
"version": "0.42.0-beta.18",
|
||||
"description": "Renders an SVG picture representing an address",
|
||||
"main": "index.js",
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
Apache-2.0 License (Apache-2.0)
|
||||
|
||||
Copyright 2016 Dan Finlay
|
||||
Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
# @polkadot/ui-identicon/beachball
|
||||
# @polkadot/react-identicon/beachball
|
||||
|
||||
Adapted from [Jazzicon](https://github.com/danfinlay/jazzicon) by Dan Finlay with the following changes -
|
||||
|
||||
@@ -16,4 +16,4 @@ Adapted from [Jazzicon](https://github.com/danfinlay/jazzicon) by Dan Finlay wit
|
||||
|
||||
Also see [src/demo.js](src/demo.js) for a randomly generated example.
|
||||
|
||||

|
||||

|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2016 Dan Finlay
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// Copyright 2018 Paritytech via paritytech/oo7/polkadot-identicon
|
||||
// Copyright 2018 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2018 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2018 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2018 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2019 @polkadot/ui-identicon authors & contributors
|
||||
// Copyright 2017-2019 @polkadot/react-identicon authors & contributors
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# @polkadot/react-qr
|
||||
|
||||
A Qr-code component that allows for the transfer of addresses and transaction payloads to and from external readers
|
||||
A Qr-code component that allows for the transfer of addresses and transaction payloads to and from external readers. It implements the [Universal Offline Signatures](https://github.com/maciejhirsz/uos) specification to read and generated QR codes.
|
||||
|
||||
@@ -23,7 +23,7 @@ interface State {
|
||||
frames: string[];
|
||||
frameIdx: number;
|
||||
image: string | null;
|
||||
timerId: NodeJS.Timeout | null;
|
||||
timerId: number | null;
|
||||
valueHash: string | null;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class Display extends React.PureComponent<Props, State> {
|
||||
|
||||
public componentDidMount (): void {
|
||||
this.setState({
|
||||
timerId: setInterval(this.nextFrame, FRAME_DELAY)
|
||||
timerId: window.setInterval(this.nextFrame, FRAME_DELAY)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ export default class DisplayExtrinsic extends React.PureComponent<Props, State>
|
||||
dataHash: null
|
||||
};
|
||||
|
||||
public getDerivedStateFromProps ({ address }: Props, prevState: State): State | null {
|
||||
public static getDerivedStateFromProps ({ address }: Props, prevState: State): State | null {
|
||||
const data = u8aConcat(
|
||||
PREFIX,
|
||||
encodeString(address)
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class DisplayPayload extends React.PureComponent<Props, State> {
|
||||
dataHash: null
|
||||
};
|
||||
|
||||
public getDerivedStateFromProps ({ address, payload }: Props, prevState: State): State | null {
|
||||
public static getDerivedStateFromProps ({ address, payload }: Props, prevState: State): State | null {
|
||||
const data = u8aConcat(
|
||||
SUBSTRATE,
|
||||
CRYPTO_SR25519,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import IdentityIcon from '@polkadot/ui-identicon';
|
||||
import IdentityIcon from '@polkadot/react-identicon';
|
||||
|
||||
interface Props {
|
||||
address: string;
|
||||
|
||||
Reference in New Issue
Block a user