
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
react-simple-accordion
Advanced tools
A simple accordion component that doesn't care how you style it. All it wants to do is expand and collapse your beatiful content.
$ yarn add react-simple-accordion
import Accordion from 'react-simple-accordion';
const list = [
{title: 'Header 1', body: 'Test 1'},
{title: 'Header 2', body: 'Test 2'},
];
const TestAccordion = () => (
<Accordion list={list}>
{({props: {title, body}, isOpen}) => ({
header: () => (
<div>
{title}
</div>
),
body: () => (
<div>
{body}
</div>
),
})}
</Accordion>
);
AccordionContainer.propTypes = {
/**
* The list of groups for the accordion. Typically is will be an
* object with a group name and some content.
*/
list: PropTypes.arrayOf(PropTypes.object).isRequired,
/**
* This is how the groups will get rendered.
*
* @param {Object} args - The arguments to the children function.
* @param {boolean} args.isOpen - Whether the group is expanded or not.
* @param {Object} args.props 0 - The props for the nth group will be the
* nth element in the list prop for the Accordion
*/
children: PropTypes.func.isRequired,
/**
* Passed as the style prop to the div containing the list of groups.
*/
style: PropTypes.object,
/**
* Passed as the className prop to the element containing the list of groups.
*/
className: PropTypes.string,
/**
* Passed as the style prop to the div containing the trigger.
*/
triggerStyle: PropTypes.object,
/**
* Passed as the className prop to the element containing the trigger.
*/
triggerClassName: PropTypes.string,
/**
* Passed as the style prop to the div containing each group.
*/
groupStyle: PropTypes.object,
/**
* Passed as the className prop to the element containing each group.
*/
groupClassName: PropTypes.string,
};
AccordionContainer.defaultProps = {
style: {},
className: '',
triggerStyle: {},
triggerClassName: '',
groupStyle: {},
groupClassName: '',
};
FAQs
React Simple Accordion Component
The npm package react-simple-accordion receives a total of 1 weekly downloads. As such, react-simple-accordion popularity was classified as not popular.
We found that react-simple-accordion 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.