Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-cimpress-fulfiller-logo

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cimpress-fulfiller-logo - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

19

lib/FufillerLogo.js

@@ -78,12 +78,12 @@ import React, { Component } from 'react';

render() {
let childContent = null;
let childContent = this.props.placeholder;
if (this.state.imageBlob) {
let objectURL = URL.createObjectURL(this.state.imageBlob);
childContent = React.createElement('img', { style: { maxWidth: "inherit", maxHeight: "inherit" }, src: objectURL });
} else if (this.state.imageIsLoading && this.props.imageLoading) {
childContent = this.props.imageLoading;
} else if (this.state.imageIsForbidden && this.props.noAccess) {
childContent = this.props.noAccess;
} else if (this.state.imageIsLoading) {
childContent = this.props.imageLoading || this.props.placeholder;
} else if (this.state.imageIsForbidden) {
childContent = this.props.noAccess || this.props.noImage || this.props.placeholder;
} else if (this.props.noImage) {
childContent = this.props.noImage;
childContent = this.props.noImage || this.props.placeholder;
}

@@ -93,2 +93,6 @@

if (!childContent) {
childContent = React.createElement('span', null);
}
if (this.props.className) {

@@ -121,3 +125,4 @@ content = React.createElement(

imageLoading: PropTypes.object,
noAccess: PropTypes.object
noAccess: PropTypes.object,
placeholder: PropTypes.object
};
{
"name": "react-cimpress-fulfiller-logo",
"version": "0.0.11",
"version": "0.0.12",
"description": "Fetches fulfiller logo from Fulfiller Identity Service.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -41,1 +41,19 @@ # react-cimpress-fulfiller-logo

<FulfillerLogo noImage={"No Image"} fulfillerId="fulfillerId" accessToken={localStorage.getItem('accessToken')}/>
### Other overrides
Fulfiller Logo defines following props, that take content
noImage: PropTypes.object,
imageLoading: PropTypes.object,
noAccess: PropTypes.object,
placeholder: PropTypes.object
`placeholder` is the image that is displayed from the mounting moment till the loading starts (since the component automatically loads the image when it comes into view this should very short period of time
`imageLoading` is the content that is displayed while loading, falls back to `placeholder`
`noAccess` is shown when the user doesn't have access to see fulfiller logo, falls back to `noImage`
`noImage` what gets displayed if the image is not available (for whatever reason)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc