1import React from 'react';
2import PropTypes from 'prop-types';
3import makeBlockie from 'ethereum-blockies-base64';
5const ValidatedBlockie = ({
18 const colorStyle = styleSelector(displayPass, displayFailure, focussed);
21 <div className={`${className}`} style={style}>
25 src={makeBlockie(address)}
35 backgroundColor: colorStyle[1],
46const styleSelector = (pass, fail, focus) => {
47 if (fail === true) return ['#FFFFFF', '#F8C134'];
48 if (pass === true) return ['#FFFFFF', '#2AA779'];
49 if (focus === true) return ['#FFFFFF', '#4330FC'];
50 return ['#FFFFFF', '#7F7F7F'];
53ValidatedBlockie.propTypes = {
54 className: PropTypes.string,
55 children: PropTypes.node,
56 style: PropTypes.object,
59ValidatedBlockie.defaultProps = {
64export default ValidatedBlockie;
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