1import React from 'react';
2import PropTypes from 'prop-types';
4import { pour } from 'sigil-js';
5import * as ob from 'urbit-ob';
6import ReactSVGComponents from '../ReactSVGComponents';
8const isValidPatp = patp => {
11 isValid = ob.isValidPatp(patp);
18const ValidatedSigil = ({
31 const colorStyle = styleSelector(displayPass, displayFailure, focussed);
34 <div className={`${className}`} style={style}>
35 {isValidPatp(patp) ? (
38 renderer: ReactSVGComponents,
45 className={'bg-transparent'}
57const styleSelector = (pass, fail, focus) => {
58 if (fail === true) return ['#FFFFFF', '#F8C134'];
59 if (pass === true) return ['#FFFFFF', '#2AA779'];
60 if (focus === true) return ['#FFFFFF', '#4330FC'];
61 return ['#FFFFFF', '#7F7F7F'];
64ValidatedSigil.propTypes = {
65 className: PropTypes.string,
66 children: PropTypes.node,
67 style: PropTypes.object,
70ValidatedSigil.defaultProps = {
75export default ValidatedSigil;
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