@bufferapp/components
Advanced tools
Comparing version 2.3.3 to 2.3.4
{ | ||
"name": "@bufferapp/components", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"description": "A shared set of UI Components", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,13 +11,2 @@ import React from 'react'; | ||
const popoverWrapperStyle = { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
height: '100vh', | ||
width: '100vw', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}; | ||
@@ -30,26 +19,40 @@ const Popover = ({ | ||
right, | ||
width, | ||
onOverlayClick, | ||
transparentOverlay, | ||
}) => ( | ||
<div style={popoverWrapperStyle}> | ||
<div | ||
style={calculateStyles({ | ||
default: { | ||
position: 'absolute', | ||
left, | ||
top, | ||
bottom, | ||
right, | ||
zIndex: modal, | ||
}, | ||
})} | ||
> | ||
{children} | ||
}) => { | ||
const popoverWrapperStyle = { | ||
position: 'absolute', | ||
top: 0, | ||
left: 0, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
height: '100vh', | ||
width: `${width || '100vw'}`, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}; | ||
return ( | ||
<div style={popoverWrapperStyle}> | ||
<div | ||
style={calculateStyles({ | ||
default: { | ||
position: 'absolute', | ||
left, | ||
top, | ||
bottom, | ||
right, | ||
zIndex: modal, | ||
}, | ||
})} | ||
> | ||
{children} | ||
</div> | ||
<Overlay | ||
onClick={onOverlayClick} | ||
transparent={transparentOverlay} | ||
/> | ||
</div> | ||
<Overlay | ||
onClick={onOverlayClick} | ||
transparent={transparentOverlay} | ||
/> | ||
</div> | ||
); | ||
); | ||
}; | ||
@@ -62,2 +65,3 @@ Popover.propTypes = { | ||
right: PropTypes.string, | ||
width: PropTypes.string, | ||
onOverlayClick: PropTypes.func, | ||
@@ -64,0 +68,0 @@ transparentOverlay: PropTypes.bool, |
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
947981
7149
1