1.0.5 • Published 3 years ago

react-collaps v1.0.5

Weekly downloads
13
License
MIT
Repository
github
Last release
3 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

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago