1.0.1 • Published 1 year ago

nmm-xas-app-dynamic-accordion v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

AppDynamicAccordion

Description

AppDynamicAccordion is a dynamic accordion component for React applications, utilizing React-Bootstrap. It allows for the creation of accordion elements dynamically by passing an array of items, each with its own title and content. This component is ideal for situations where the accordion content needs to be generated programmatically or is subject to change.

Installation

To use AppDynamicAccordion in your project, you need to have React and React-Bootstrap installed. If you haven't already installed these dependencies, you can do so by running the following commands:

npm install react react-dom
npm install react-bootstrap

After installing the necessary dependencies, you can install AppDynamicAccordion via npm:

npm install nmm-xas-app-dynamic-accordion

Usage

To use AppDynamicAccordion in your React application, first import the component:

import AppDynamicAccordion from 'nmm-xas-app-dynamic-accordion';

Then, you can use the AppDynamicAccordion component in your app by passing an array of objects as accordionItems. Each object should have a title and content property.

Here's an example of how to use AppDynamicAccordion:

import React from 'react';
import AppDynamicAccordion from 'nmm-xas-app-dynamic-accordion';

const MyComponent = () => {
  const accordionData = [
    {
      title: 'Accordion Item #1',
      content: 'Content for the first item...'
    },
    {
      title: 'Accordion Item #2',
      content: 'Content for the second item...'
    },
    // Add more items as needed
  ];

  return <AppDynamicAccordion accordionItems={accordionData} />;
};

export default MyComponent;
1.0.1

1 year ago

1.0.0

1 year ago