Socket
Socket
Sign inDemoInstall

react-crossfade-image

Package Overview
Dependencies
21
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 1.0.7

8

index.es5.js

@@ -69,9 +69,9 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

"div",
{ style: { position: "relative" } },
{ style: _extends({}, defaultStyle, { position: "relative" }) },
topSrc && React.createElement("img", {
style: _extends({}, style, { position: "absolute" }),
style: _extends({}, defaultStyle, style, { position: "absolute" }),
src: topSrc
}),
bottomSrc && React.createElement("img", {
style: _extends({}, style, {
style: _extends({}, defaultStyle, style, {
opacity: bottomOpacity,

@@ -92,2 +92,4 @@ transition: "opacity " + duration / 1000 + "s " + timingFunction + " " + delay / 1000 + "s"

var defaultStyle = { maxWidth: "100%", maxHeight: "100%" };
CrossfadeImage.propTypes = {

@@ -94,0 +96,0 @@ src: PropTypes.string.isRequired,

@@ -40,9 +40,6 @@ import React, { Component } from "react";

return (
<div style={{ position: "relative" }}>
<div style={{ ...defaultStyle, ...{ position: "relative" } }}>
{topSrc &&
<img
style={{
...style,
...{ position: "absolute" }
}}
style={{ ...defaultStyle, ...style, ...{ position: "absolute" } }}
src={topSrc}

@@ -53,2 +50,3 @@ />}

style={{
...defaultStyle,
...style,

@@ -67,2 +65,4 @@ ...{

const defaultStyle = { maxWidth: "100%", maxHeight: "100%" };
CrossfadeImage.propTypes = {

@@ -69,0 +69,0 @@ src: PropTypes.string.isRequired,

{
"name": "react-crossfade-image",
"version": "1.0.6",
"version": "1.0.7",
"description": "Simple React component for crossfading images",

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

@@ -35,3 +35,3 @@ # react-crossfade-image

### style
Custom styling for the image - e.g. maxWidth: '100%', maxHeight: '100%' for responsive image scaling
Custom styling for the image - default to { maxWidth: '100%', maxHeight: '100%' } for responsive image scaling

@@ -38,0 +38,0 @@ ## License

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc