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
+37
View File
@@ -0,0 +1,37 @@
// 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.
import React from 'react';
import ReactDOM from 'react-dom';
import { encodeAddress, randomAsU8a } from '@polkadot/util-crypto';
import IdentityIcon from '.';
export default class Demo extends React.PureComponent {
public render (): React.ReactNode {
const identities: string[] = [];
while (identities.length !== 50) {
identities.push(
encodeAddress(randomAsU8a(32))
);
}
return identities.map((value): React.ReactNode => (
<IdentityIcon
key={value.toString()}
theme='jdenticon'
value={value}
/>
));
}
}
const rootElement = document.getElementById('demo');
if (!rootElement) {
throw new Error(`Unable to find element with id 'demo'`);
}
ReactDOM.render(<Demo />, rootElement);