1.0.3 • Published 2 years ago

summary-details v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

summary-details

React component for extra content Typescript version

npm

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

import CollapseDetails from "summary-details";

<CollapseDetails summary="Lorem ipsum dolor sit">
  <p>
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima voluptates
    obcaecati
  </p>
</CollapseDetails>;

How to use custom props component

import CollapseDetails from "summary-details";

<CollapseDetails
  summary="Lorem ipsum dolor sit"
  width="60rem"
  bgColor="red"
  bgHover="blue"
  color="yellow"
  colorHover="pink"
  borderRadius="1em"
>
  <p>
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima voluptates
    obcaecati
  </p>
</CollapseDetails>;

Properties

This component is an abstraction of a collapse, but using native HTML properties.

PropstyperequiredDescription
widthstring
summarystringX
childrenelementX
bgColorstringBackground color of summary
bgHoverstringBackground color hover of summary
colorstringColor of summary
colorHoverstringColor hover of summary
borderRadiusstringBorder radius of summary
borderstringBorder of summary
styleDetailsContentstringClass to style the content