@home-app/image.component
Advanced tools
Comparing version 3.1.0 to 3.2.0
{ | ||
"name": "@home-app/image.component", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/homeappcorporate/homeless-components", |
@@ -53,3 +53,3 @@ import React, { Component, Fragment } from 'react'; | ||
render() { | ||
const { alt, className } = this.props; | ||
const { alt, className, cover } = this.props; | ||
const { src, dimensions, defaultDimension, accountPixelDensity, isFace } = this.props; | ||
@@ -84,3 +84,3 @@ const { sources, baseSource, baseSourceFallback } = this._generateSources( | ||
<Img src={baseSourceFallback} srcSet={baseNormalSet} alt={alt} /> | ||
<Img src={baseSourceFallback} srcSet={baseNormalSet} alt={alt} cover={cover} /> | ||
</Picture> | ||
@@ -112,2 +112,3 @@ </Container> | ||
accountPixelDensity: PropTypes.bool, | ||
cover: PropTypes.bool, | ||
}; | ||
@@ -121,4 +122,5 @@ | ||
accountPixelDensity: true, | ||
cover: false, | ||
}; | ||
export default Image; |
@@ -1,6 +0,6 @@ | ||
import styled from 'styled-components'; | ||
import styled, { css } from 'styled-components'; | ||
export const Container = styled.div` | ||
position: relative; | ||
overflow: hidden; | ||
@@ -21,2 +21,8 @@ `; | ||
transform: translate(-50%, 0); | ||
${props => props.cover && | ||
css` | ||
width: 100%; | ||
object-fit: cover; | ||
`}; | ||
`; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
201
8102
5
1