1.0.0 • Published 1 year ago

nmm-xas-app-sidebar-style1 v1.0.0

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

AppSideBar Component

AppSideBar is a React component designed for creating a responsive and interactive sidebar navigation in your application. It supports click-outside-to-close functionality and customizable width.

Installationgigit

Before using the AppSideBar component, you need to have Node.js installed on your machine. You can download and install Node.js from Node.js official website.

After installing Node.js, you can install the AppSideBar component and its dependencies via npm (Node Package Manager).

Installing Dependencies

Run the following command in your project directory to install the necessary dependencies:

npm install react react-dom react-router-dom styled-components react-icons --save

This command installs React, ReactDOM, react-router-dom for routing, styled-components for styling, and react-icons which is used for icons in the navigation list.

Usage

Importing the Component

First, import the AppSideBar component into your React application:

import AppSideBar from './path/to/AppSideBar'; // Update with the actual path

Using the Component

Here's an example of how to use the AppSideBar component in a React application:

import React from 'react';
import AppSideBar from './path/to/AppSideBar'; // Update with the actual path
import { TempNavList } from './path/to/TempNavList'; // Update with the actual path

function MyApp() {
  return (
    <div className="App">
      <AppSideBar getNavigationList={TempNavList} width="250px" className="my-sidebar" />
      {/* Other components */}
    </div>
  );
}

export default MyApp;

In this example, TempNavList is a function that returns an array of navigation items for the sidebar. Each item in this array is an object that represents a navigation link or a group of links with sub-items.

1.0.0

1 year ago