Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josellia/collapse-details-typescript
Collapse details
https://github.com/josellia/collapse-details-typescript
library reactjs typescript
Last synced: 17 days ago
JSON representation
Collapse details
- Host: GitHub
- URL: https://github.com/josellia/collapse-details-typescript
- Owner: josellia
- License: mit
- Created: 2021-11-14T19:47:21.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-20T12:36:37.000Z (about 3 years ago)
- Last Synced: 2024-12-06T05:34:04.123Z (about 1 month ago)
- Topics: library, reactjs, typescript
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# summary-details
React component for extra content Typescript version
![npm](https://img.shields.io/npm/v/summary-details)
https://user-images.githubusercontent.com/33287490/138172984-83e1c7bc-717c-490a-a713-a1e7903451ad.mp4
## How to install
Below are ways to install the library using npm or yarn:
```
npm i summary-details
# ou
yarn add summary-details
```## How to use default component
```jsx
import CollapseDetails from "summary-details";
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima voluptates
obcaecati
;
```## How to use custom props component
```jsx
import CollapseDetails from "summary-details";
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima voluptates
obcaecati
;
```## Properties
This component is an abstraction of a collapse, but using native HTML properties.
| Props | type | required | Description |
| ------------------- | ------- | -------- | --------------------------------- |
| width | string | | |
| summary | string | X | |
| children | element | X | |
| bgColor | string | | Background color of summary |
| bgHover | string | | Background color hover of summary |
| color | string | | Color of summary |
| colorHover | string | | Color hover of summary |
| borderRadius | string | | Border radius of summary |
| border | string | | Border of summary |
| styleDetailsContent | string | | Class to style the content |