How to use the jdenticon.toSvg function in jdenticon

To help you get started, we’ve selected a few jdenticon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Emurgo / yoroi-frontend / app / components / wallet / staking / dashboard / StakePool.js View on Github external
render() {
    const { intl } = this.context;

    const { hash, poolName } = this.props;

    const avatarSource = jdenticon.toSvg(hash, 36, { padding: 0 });

    // Taken from Seiza (dangerouslyEmbedIntoDataURI())
    const avatar = `data:image/svg+xml;utf8,${encodeURIComponent(avatarSource)}`;

    // const tableData = [
    //   {
    //     label: intl.formatMessage(messages.performance),
    //     value: data.percentage + ' %',
    //   },
    //   {
    //     label: intl.formatMessage(messages.fullness),
    //     value: data.fullness + ' %',
    //   },
    //   {
    //     label: intl.formatMessage(globalMessages.marginsLabel),
    //     value: data.margins + ' %',
github codehangar / reqlpro / app / components / Sidebar / Connections / connections.reducer.js View on Github external
function addConnection(state, connection) {
  const newConnection = Object.assign({}, connection, {
    identicon: jdenticon.toSvg(md5(connection.name), 40),
    index: state.length || 0
  });

  return state.concat(newConnection);
}
github polkadot-js / ui / packages / react-identicon / src / icons / Jdenticon.tsx View on Github external
public render (): React.ReactNode {
    const { className, publicKey, size, style } = this.props;

    return (
      <div style="{style}">
    );
  }
}</div>
github codehangar / reqlpro / app / actions.spec.js View on Github external
describe('writeConfigFile', () => {

    const state = {
      connections: [{
        authKey: "",
        database: "",
        host: "192.168.99.100",
        identicon: jdenticon.toSvg(md5("rethink-tut"), 40),
        index: 0,
        name: "rethink-tut",
        port: "32769"
      }],
      main: {
        email: 'cassie@codehangar.io',
        created: '',
        dbConnection: { stuff: 'stuff' },
        connection: {
          selected: {
            name: 'localhost',
            host: 'localhost',
            port: 1234
          }
        },
        selectedTable: {
github aarohmankad / identicon-api / routes / identicons / generate.js View on Github external
router.get('/:hash/:size', (req, res) => {

		let
			hash = Hash.sha256().update(req.params.hash).digest('hex'),
			size = parseInt(req.params.size),
			identicon;

		if (req.query.format == 'png') {
			identicon = jdenticon.toPng(hash, size);
		} else {
			identicon = jdenticon.toSvg(hash, size);
		}

		return res.send(identicon);
	});
}
github swaponline / swap.react / shared / components / Avatar / Avatar.js View on Github external
const Avatar = ({ value, className, size }) =&gt; (
  
    <img data-for="gravatar" data-tip="" src="{`data:image/svg+xml,${encodeURIComponent(jdenticon.toSvg(value," alt="{value}">
        
          <span>Automatically created gravatar. its unique for every profile. You can see your in the upper right corner</span>
        
    
)
github cennznet / runanode / app / renderer / pages / wallet / account / PortfolioSection.js View on Github external
const AssetIdIcon = ({ value }) =&gt; {
  const SVG = styled(SVGInline).attrs({
    svg: jdenticon.toSvg(value, 50),
  })`
    width: auto;
  `;
  return <svg></svg>;
};