Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@reactour/popover
Advanced tools
A popover positioned based on certain values
https://docs.react.tours/popover
npm i -S @reactour/popover
# or
yarn add @reacmask/popover
import { Popover } from '@reactour/popover'
function App() {
const sizes = {
bottom: 0,
left: 0,
}
return (
<>
{/* ... */}
<Popover sizes={sizes}>
</>
)
}
Popover
sizes: RectResult
type RectResult = {
width?: number
height?: number
top?: number
left?: number
bottom?: number
right?: number
}
Object containing size and position informations of where to position the Popover
position?: Position
type Position =
| 'top'
| 'right'
| 'bottom'
| 'left'
| 'center'
| [number, number]
| ((postionsProps: PositionProps, prevRect: RectResult) => Position)
type PositionProps = {
bottom: number
height: number
left: number
right: number
top: number
width: number
windowWidth: number
windowHeight: number
}
The position for the Popover, fixed in case of [number, number]
, calculated prefered position in case of string
padding?: number | number[]
Extra space to add in Popover position calculations. Useful when calculating space from Element
bounding rect and want to add more space.
Single number sets same space for all sides, otherwise an Array sets [x, y]
or [top, x, bottom]
or [top, right, bottom, left]
.
styles?: StylesObj
Prop to customize styles for the different parts of the Mask using a function that allows to extend the base styles an take advantage of some state props.
className?: string
Class to apply to the Popover
key | props |
---|---|
popover | position , verticalAlign , horizontalAlign , helperRect , targetRect |
refresher?: any
Any value that if changed, updates rect calculations
const styles = {
popover: (base) => ({
...base,
boxShadow: '0 0 3em rgba(0, 0, 0, 0.5)',
backgroundColor: '#dedede',
}),
}
FAQs
A popover positioned based on certain values
The npm package @reactour/popover receives a total of 49,590 weekly downloads. As such, @reactour/popover popularity was classified as popular.
We found that @reactour/popover demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.