Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
agilite-react
Advanced tools
A ReactJS module that allows you to create a customizable SPA (Single Page Application), with tabbing, menu navigation, Ant Design library and integration into Agilit-e.
Using NPM:
npm install agilite-react --save-dev
Import the AgiliteReact Component
import AgiliteReact from 'agilite-react'
Basic Rendering of Component
import React from 'react'
import ReactDOM from 'react-dom'
import AgiliteReact from 'agilite-react'
ReactDOM.render(
<AgiliteReact />,
document.getElementById('root')
)
Advanced Rendering of Component with state
In order to customise the AgiliteReact component, declare a JavaScript Object and add it as a state prop to the component:
import React from 'react'
import ReactDOM from 'react-dom'
import AgiliteReact from 'agilite-react'
function TestComponent () {
return (
<div>Hello World</div>
)
}
const state = {
rootContent: TestComponent,
toolbar: {
enabled: true,
title: 'My Toolbar Title'
}
}
ReactDOM.render(
<AgiliteReact state={state} />,
document.getElementById('root')
)
Below is a detailed rundown of the state props that can be passed to the AgiliteReact component:
{
primary: '#d32f2f',
primaryLight: '#ff6659',
primaryDark: '#9a0007',
secondary: '#e0e0e0',
secondaryLight: '#ffffff',
secondaryDark: '#aeaeae'
}
[
{
key: 'todos', // string - Menu Item Key
title: 'Todo', // String/React.ReactNode
children: [ // Sub Menu Items
{
key: 'all_todos',
title: 'All Todos' // String/React.ReactNode
}
]
}
]
Note: Menu items can contain children properties to nest sub menus
Note: All the 'leftMenu' rules apply for the 'rightMenu'
customMenus: {
content: SignOutIcon // React.ReactNode || String
}
{
key: 'users', // string - Tab key
closeable: true, // boolean - Whether the tab is closeable
title: 'Users', // string - Tab title
content: Users // React.ReactNode - The content of the tab
}
Below is an example of the default configuration
import React from 'react'
import ReactDOM from 'react-dom'
import AgiliteReact from 'agilite-react'
function RootContent () {
return (
<div>Root Content</div>
)
}
const state = {
rootContent: RootContent,
theme: {},
leftMenu: {
leftMenuTitle: 'Left Menu',
leftMenuEnabled: true,
menuItems: [],
visible: false,
onLeftMenuOpen: () => { },
onLeftMenuClose: () => { },
onLeftMenuItemClick: () => { },
expandedMenuItems: []
},
rightMenu: {
rightMenuTitle: 'Right Menu',
rightMenuEnabled: true,
menuItems: [],
visible: false,
onRightMenuOpen: () => { },
onRightMenuClose: () => { },
onRightMenuItemClick: () => { },
expandedMenuItems: []
},
toolbar: {
enabled: true,
title: 'Agilit-e React',
customMenus: {
content: null
}
},
tabNavigation: {
enabled: true,
rootTabKey: 'home',
rootTabTitle: 'Home',
activeKey: 'home',
animated: true,
tabs: [],
onTabChange: () => { },
onTabClose: () => { }
}
}
ReactDOM.render(
<AgiliteReact state={state} />,
document.getElementById('root')
)
FAQs
Agilit-e React Module
The npm package agilite-react receives a total of 0 weekly downloads. As such, agilite-react popularity was classified as not popular.
We found that agilite-react 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.