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:
Jaco Greeff
2019-07-29 11:30:37 +02:00
committed by GitHub
parent faf234fedc
commit c3f57c19e8
50 changed files with 56 additions and 52 deletions
@@ -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,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,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
@@ -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.
![demo](https://raw.githubusercontent.com/polkadot-js/ui/master/packages/ui-identicon/demo.png)
![demo](https://raw.githubusercontent.com/polkadot-js/ui/master/packages/react-identicon/demo.png)
@@ -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,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,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,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,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,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,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,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,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 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,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,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,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 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,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,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 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,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,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 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 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,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,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,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
View File
@@ -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.
+2 -2
View File
@@ -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)
});
}
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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;