Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@r/widgets
Advanced tools
A collection of React components and the Redux actions and reducers to accompany them
A collection of helpful React components that can be used without much effort in a React + Redux environment
To install, use npm:
npm install -S @r/widgets
You'll also need to install the peer dependencies. Ex:
npm install -S lodash@4 react@15 react-redux@4 redux@3 reselect@2
First, plug in the reducer. Be sure that the reducer is named widgets
in the store.
import widgets from '@r/widgets/reducer';
import { combineReducers } from 'redux';
const reducers = combineReducers({
widgets,
/* other reducers */
});
Create a tooltip and give it a target. Both the target and the tooltip must have the same id.
import React from 'react';
import { Tooltip, TooltipTarget } from '@r/widgets/tooltip';
class Foo extends React.Component {
render() {
return (
<div>
<div>
<TooltipTarget id='test tooltip'>Mouse over me!</Target>
</div>
<Tooltip
id='test tooltip'
alignment={ Tooltip.ALIGN.ABOVE }
>
Hello!
</Tooltip>
</div>
);
}
}
And that's it! Tooltip and Target also come with a few configuration options:
Tooltip
alignment
: One of Tooltip.ALIGN.ABOVE
, Tooltip.ALIGN.BELOW
, Tooltip.ALIGN.LEFT
, Tooltip.ALIGN.RIGHT
offset
: Number of pixels the tooltip should be separated from the target when shown.Target
type
: Indicates what kind of action will trigger the tooltip. One of Target.TYPE.HOVER
, Target.TYPE.CLICK
, or Target.TYPE.BOTH
.FAQs
A collection of React components and the Redux actions and reducers to accompany them
The npm package @r/widgets receives a total of 10 weekly downloads. As such, @r/widgets popularity was classified as not popular.
We found that @r/widgets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.