react-reusable-table-library
Version:
A reusable React table component library by Abhishek
61 lines (38 loc) • 1.09 kB
Markdown
# react-reusable-table-library React Component Library
This package contains reusable React components, including the `ReusableTable` component.
## Installation
You can install the package from npm (once published):
```bash
npm install react-reusable-table-library
```
## Usage
Import the components you need:
```jsx
import { ReusableTable } from 'react-reusable-table-library';
const data = [
{ id: 1, name: 'John', age: 30 },
{ id: 2, name: 'Jane', age: 25 },
];
function App() {
return <ReusableTable data={data} title="User Data" />;
}
```
## Development
To build the package locally, run:
```bash
npm run build
```
This will create a `dist` folder with the bundled files.
## Publishing
The package is configured to build with Rollup and output CommonJS and ES module formats.
Before publishing, ensure you are logged in to npm:
```bash
npm login
```
To publish the package, run:
```bash
npm publish --access public
```
Note: The package has peer dependencies on `react` and `react-dom`. Make sure these are installed in your consuming project.
## License
MIT