-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f28a2c
commit a8435ed
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# reactjs-accordions | ||
|
||
> A useful and simple package to create an react accordion. | ||
[![NPM](https://img.shields.io/npm/v/reactjs-accordions.svg)](https://www.npmjs.com/package/reactjs-accordions) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
|
||
## Full Document | ||
- [Document](https://mostafarostami72.github.io/reactjs-accordions/) | ||
## Demo | ||
- [Demo](https://mostafarostami72.github.io/reactjs-accordions/) | ||
|
||
|
||
## Install | ||
|
||
```bash | ||
npm install --save reactjs-accordions | ||
``` | ||
|
||
## Usage | ||
|
||
```jsx | ||
import React from 'react' | ||
|
||
import Accordions from 'reactjs-accordions'; | ||
import 'reactjs-accordions/dist/index.css'; | ||
|
||
const Example = () => { | ||
|
||
const items = [ | ||
{title: 'Accordion title 1', caption: 'Accordion content 1'}, | ||
{title: 'Accordion title 2', caption: 'Accordion content 2'}, | ||
{title: 'Accordion title 3', caption: 'Accordion content 3'}, | ||
{title: 'Accordion title 4', caption: 'Accordion content 4'}, | ||
]; | ||
|
||
return ( | ||
<div className="border px-3 rounded-lg"> | ||
<Accordions | ||
items={items} | ||
className="" | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Example; | ||
``` | ||
|
||
|
||
## Support | ||
We are glad you choose this package. If this package is useful for you, please give us a star. | ||
|
||
## License | ||
|
||
MIT © [MostafaRostami72](https://github.com/MostafaRostami72) |