Files
pezkuwi-ui/packages/vue-identicon/README.md
T
Jaco Greeff 85a8a3a0ee Add vue-identicon (#178)
* Add vue-identicon

* Remove generated file

* Add links to reactnative & vue identicons

* Update package.json

* Update Jdenticon.vue

* Update Polkadot.vue

* Move deps around

* Empty on error

* Build to build

* ... typo

* Fix vue-identicon doc generation

* Ok, I give up... vuepress and vue packages, no luck

* Swap to TypeScript components (aligning with polkadot-js)

* Expand template with build

* Adjust vue examples

* debump gh-pages dep

* Expand doc. desc.

* Fix vuepress docs generation

* Address CC complexity

* eslint fix (babel config)

* Add Bechball
2019-08-06 13:15:10 +02:00

33 lines
876 B
Markdown

# @polkadot/vue-identicon
A generic identity icon that can render icons based on an address.
## Usage Examples
To install the component, do `yarn add @polkadot/vue-identicon` and then use it with `import Identicon from '@polkadot/vu-identicon';`
Inside a Vue component, you can now render any account with the associated icon, with associated props -
- `value` - the address you wish to display
- `size` (optional, defaults to `64`) - the size in pixels
- `theme` (optional, defaults to `substrate`) - the theme to use, one of
- `polkadot` or
- `substrate` (equivalent to `jdenticon`) or
- `beachball` or
- `empty` (displaying nothing)
```
<template>
<Identicon
:size="128"
:theme="polkadot"
:value="5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
/>
</template>
<script>
import Identicon from '@polkadot/vue-identicon';
...
</script>
```