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.
react-popover
Advanced tools
:toc: macro :toc-title: :toclevels: 99
image:https://travis-ci.org/littlebits/react-popover.svg?branch=master["Build Status", link="https://travis-ci.org/littlebits/react-popover"]
toc::[]
react-popover
>= 0.5.0
supports React 16 while react-popover
< 0.5.0
works with React 15.x.x
and likely lower. There is no plan to support older versions of this library with back-ported patches and PRs for that purpose are not welcome since it increases maintenance for the authors.
yarn add react-popover
Look at the link:https://littlebits.github.io/react-popover[stories in our storybook].
export default
Popover(props, target)
props :: {...}
body :: Node | Array Node
The popover
content.
isOpen :: Boolean
Determines Whether or not the popover is rendered.
preferPlace :: Enum String | Null
Sets a preference of where to position the Popover. Only useful to specify placement in case of multiple available fits. Defaults to null
. Valid values are:
above | right | below | left
:: Prefer an explicit side.
row | column
:: Prefer an orientation.
start | end
:: Prefer an order.
null
:: No preference, automatic resolution. This is the default.
place :: String | Null
Like preferPlace
except that the given place is a requirement. The resolver becomes scoped or disabled. It is scoped if the place
is an orientation
or order
but disabled if it is a side
. For example place: "row"
scopes the resolver to above
or below
placement but place: "above"
removes any need for the resolver.
onOuterAction :: (Event) -> Void
A callback function executed every time the user does an action (mousedown
or touchstart
) outside the DOM tree of both Popover
and Target
. A canonical use-case is to automatically close the Popover on any external user action.
refreshIntervalMs :: Number | Falsey
The polling speed (AKA time between each poll) in milliseconds for checking if a layout refresh is required. This polling is required because it is the only robust way to track the position of a target in the DOM. Defaults to 200
. Set to a falsey value to disable.
enterExitTransitionDurationMs :: Number | Falsey
The amount of time in milliseconds that it takes to complete the enter and exit animation. Defaults to '500'.
tipSize :: Number
Defines the size of the tip pointer. Use .01 to disable tip. Defaults to '7'.
className
and style
.target :: ReactElement
target
rendering tree
is unaffected. Popover
will become its owner
.appendTarget :: DOMElement
FAQs
A specification backed popover for react
The npm package react-popover receives a total of 15,518 weekly downloads. As such, react-popover popularity was classified as popular.
We found that react-popover demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.