Skip to content

Releases: roginfarrer/collapsed

v3.0.0-2

15 Mar 21:35
Compare
Choose a tag to compare
v3.0.0-2 Pre-release
Pre-release
  • Fix Git history

v2.2.3...v3.0.0-2

v3 featuring TypeScript and auto transition duration for variable height!

15 Mar 21:14
34e296e
Compare
Choose a tag to compare

What's new?

  • Rewritten in TypeScript
  • BREAKING New calculated duration based on the height of the collapsed element-- made the default

v2.2.3...v3.0.0-1

2.2.3

17 Nov 19:50
Compare
Choose a tag to compare

Fixed ID mismatch during SSR (#32)

v2.2.2

28 Sep 14:22
Compare
Choose a tag to compare

#30 - fix(animation): React to updated height properly

v2.2.1

15 Aug 20:45
Compare
Choose a tag to compare
  • #24 Simplify logic, eliminate collapse flashes
  • #25 Improve destructuring of prop getter args

`collapsedHeight`

05 Jul 19:44
Compare
Choose a tag to compare

Added support for collapsedHeight #20

v2.0.0

10 Mar 20:17
2be7f8f
Compare
Choose a tag to compare

2.0.0 (2019-03-10)

Complete rewrite using React hooks!

  • Ends support for React versions < 16.8.x
  • Library now exports a custom hook in lieu of a render prop component
  • Adds support for unmounting the contents of the Collapse element when closed
import React from 'react';
import useCollapse from 'react-collapsed';

function Demo() {
  const {getCollapseProps, getToggleProps, isOpen} = useCollapse();

  return (
    <>
      <button {...getToggleProps()}>{isOpen ? 'Collapse' : 'Expand'}</button>
      <section {...getCollapseProps()}>Collapsed content 🙈</section>
    </>
  );
}

Refactor to use react-hooks

27 Feb 03:36
Compare
Choose a tag to compare
Pre-release
import {useCollapse} from 'react-collapsed';

Initial Release

27 Feb 03:23
Compare
Choose a tag to compare