
Research
/Security News
Compromised npm Packages in the AsyncAPI Namespace Deliver Miasma Botnet Loader
3 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.
global-component
Advanced tools
基于react和mui5提供一些可供全局调用的组件接口,可自定义组件
import Master, {Global} from "global-component";
import Button from "@mui/material/Button";
function App() {
const {openTip} = useContext(Global)
return <Button onClick={() => {
openTip("好椰")
}}>
click
</Button>
}
ReactDOM.render(
<React.StrictMode>
<Master>
<App/>
</Master>
</React.StrictMode>
,
document.getElementById('root')
);

默认使用 mui5 的相关组件,可自定义
import Master, {GlobalTip} from "global-component";
function Tip(props: GlobalTip) {
const {
open,
autoHideDuration,
type,
info,
onClose//用于将open set为false的函数 无需定义,使用即可
} = props
return <div className={'tip'}>
{open ? <>content here</> : ""}
<input type={"button"} onClick={() => onClose()}>关闭</input>
</div>
}
ReactDOM.render(
<React.StrictMode>
<Master Tip={Tip}>
<App/>
</Master>
</React.StrictMode>
,
document.getElementById('root')
);
FAQs
support some common global component api use react and mui5
We found that global-component 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
3 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.