1import React from 'react'
2import PropTypes from 'prop-types'
3import makeBlockie from 'ethereum-blockies-base64'
4import Button from './Button'
5import { invert } from '../lib/state'
7const isValidAddress = (address) => /^0x[0-9a-fA-F]{40}$/.test(address);
9class ShowBlockie extends React.Component {
18 this.toggle = this.toggle.bind(this)
19 // this.close = this.close.bind(this)
23 toggle = () => this.setState(invert('open', this.state))
26 const { props, state } = this
28 const display = state.open
32 const isValid = isValidAddress(props.address)
35 <div className={`flex flex-column items-start ${props.className}`}>
50 className={`${display} mt-2`}
52 src={ makeBlockie(props.address) }
65ShowBlockie.propTypes = {
66 className: PropTypes.string,
67 children: PropTypes.node,
68 style: PropTypes.object,
72ShowBlockie.defaultProps = {
81export default ShowBlockie;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list