Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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 2 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.