Skip to content

v2.0.0

Compare
Choose a tag to compare
@thibaudcolas thibaudcolas released this 19 Nov 22:21
· 323 commits to main since this release

2.0.0 (2020-11-19)

Features

  • api: replace list nesting APIs with a single getListNestingStyles (3703b2f)
  • deps: proactively declare support with Draft.js v0.12.0 (586b385)

BREAKING CHANGES

  • api: The <ListNestingStyles max={6} /> component has been removed,
    and the generateListNestingStyles method is now deprecated and
    will be removed in a future release.

Both are replaced with a getListNestingStyles method, which works exactly the same as
generateListNestingStyles, but with a different parameter order, and with default values:

export const getListNestingStyles = (
  maxDepth: number,
  minDepth: number = DRAFT_DEFAULT_MAX_DEPTH + 1,
  selectorPrefix: string = DRAFT_DEFAULT_DEPTH_CLASS,
) => {
  return generateListNestingStyles(selectorPrefix, minDepth, maxDepth);
}

This small breaking change allows us to remove this package’s peerDependency on React,
making it easier to upgrade to React 17, and other versions in the future.