
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Define react component style for multiple breakpoints directly in props
In every project I find my self lost about defining styles and media queries. So this simple component pretends to make my and your life easier.
$ npm i react-inln
import Box from 'react-inln'
export default () => (
<Box tag='section'
color="red"
color_xs="blue"
width_l="1400px"
width_s="200px"
onClick={() => ...}
>
...
</Box>
)
The default breakpoints are:
{ match: 'only screen and (max-width: 575px)', alias: 'xs' },
{ match: 'only screen and (max-width: 768px)', alias: 's' },
{ match: 'only screen and (max-width: 992px)', alias: 'm' },
{ match: 'only screen and (max-width: 1200px)', alias: 'l' },
{ match: 'only screen and (min-width: 1201px)', alias: 'xl' },
but they are easy to modify. To do so, consider the following example:
//components/Element.js
import RootElement from 'react-inln'
export default class Element extends RootElement {
breakpoints: [
{ match: 'only screen and (min-width: 1200px)', alias: 'extraLarge' },
{ match: 'only screen and (min-width: 992px)', alias: 'large' },
{ match: 'only screen and (min-width: 769px)', alias: 'medium' },
{ match: 'only screen and (min-width: 321px)', alias: 'small' },
{ match: 'only screen and (min-width: 1px)', alias: 'verySmall' },
]
}
import React, { Component } from 'react'
import Element from 'components/Element.js'
class Somenthig extends Component{
...
render() {
return <Element tag="input" color="red" color_extraLarge="orange" />
}
}
Optional: Create React app in other folder and install this package with npm link or npm i path/to/react-inln
FAQs
Define react component style for multiple breakpoints directly in props
We found that react-inln 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.