1.0.5 • Published 5 years ago

react-collaps v1.0.5

Weekly downloads
13
License
MIT
Repository
github
Last release
5 years ago

React-collaps

React component for collapsing and expanding state. Useable for developing component like accordions and similar stuff.

demo preview

How to use

function Section({ children, title, id }) {
  const [state, setState] = useState(false);
  return (
    <div>
      <button
        onClick={(e) => {
          setState((v) => !v);
        }}
      >
        <h4>{title}</h4>
      </button>
      <Collapse in={state}>
        <div>{children}</div>
      </Collapse>
    </div>
  );
});
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago