
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
react-style-editor
Advanced tools
A React component that displays and edits CSS, similar to the browser's DevTools.
A React component that displays and edits CSS, similar to the browser's DevTools.
npm i react-style-editor
import React from 'react'
import StyleEditor from 'react-style-editor'
class Component extends React.Component {
render() {
return (
<StyleEditor
defaultValue={`
div {color:red;}
/* Hello, World! */
@media screen {
article {
display: flex;
}
}
`}
/>
)
}
}
prop | type | default | description |
---|---|---|---|
defaultValue | string | '' | The initial CSS code |
value | string | undefined | The controlled CSS code |
onChange | function | null | A closure that receives a single argument, string or array , depending on the value of outputFormats |
outputFormats | string | 'pretty' | Comma-separated values of: 'preserved' , 'machine' , 'pretty' |
readOnly | boolean | false | All interactions with the component are blocked |
All parameters are optional, but some are inter-related. For example, due to the nature of React, you should use StyleEditor
either fully controlled or fully uncontrolled (see this article).
A short summary:
defaultValue
=> uncontrolled, the component is on its ownvalue
=> controlled => you must also use the onChange
or readOnly
properties.The above behavior is identical to that of normal React form elements, e.g. <textarea/>
.
Any other props are spread to the internal root.
TAB
, :
and UP
/DOWN
increments of numeric valuespropTypes
FAQs
A React component that displays and edits CSS, similar to the browser's DevTools.
The npm package react-style-editor receives a total of 4,167 weekly downloads. As such, react-style-editor popularity was classified as popular.
We found that react-style-editor 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.