Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
radium-plugin-friendly-pseudos
Advanced tools
Radium plugin for easier to type pseudo classes, such as onHover instead of ':hover'
Radium plugin for easier to type pseudo classes. Converts nested style objects with keys like onHover
to the format Radium expects, :hover
. These are a bit more natural to type in JavaScript. Note that this will transform all keys that look like onSomething, but Radium only supports a limited subset of pseudos, namely onActive
, onFocus
, and onHover
.
Example:
{
onActive: {color: 'blue'},
onHover: {color: 'red'},
onFocus: {color: 'yellow'}
}
Becomes
{
':active': {color: 'blue'},
':hover': {color: 'red'},
':focus': {color: 'yellow'}
}
radium-plugin-friendly-pseudos
should be added directly before Radium.Plugins.resolveInteractionStyles
. Radium plugins are setup by passing a config object to @Radium
. Since you'll probably want to use this plugin everywhere you use Radium, you can create your own module with a configured version of Radium:
ConfiguredRadium.js
var Radium = require('radium');
var friendlyPseudos = require('radium-plugin-friendly-pseudos');
function ConfiguredRadium(component) {
return Radium({
plugins: [
Radium.Plugins.mergeStyleArray,
Radium.Plugins.checkProps,
Radium.Plugins.resolveMediaQueries,
friendlyPseudos,
Radium.Plugins.resolveInteractionStyles,
Radium.Plugins.prefix,
Radium.Plugins.checkProps,
]
})(component);
}
module.exports = ConfiguredRadium;
Then you just use @ConfiguredRadium
instead of @Radium
. Or ConfiguredRadium(MyComponent)
instead of Radium(MyComponent)
.
@ConfiguredRadium
class MyComponent extends Component {
// ...
}
FAQs
Radium plugin for easier to type pseudo classes, such as onHover instead of ':hover'
We found that radium-plugin-friendly-pseudos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.