Skip to content

Commit

Permalink
prep for v.1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrzhou committed Jul 21, 2020
1 parent 765ceb3 commit ba3336d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [1.2.4](https://github.com/chrisrzhou/react-wordcloud/compare/v1.2.4...v1.2.3) (2020-07-21)

- Added `...rest` props (@davidjb)
- Added `tooltipOptions` to `options` (@davidjb) to configure `tippy` tooltips.
- Added `svgAttributes` and `textAttributes` to `options` to configure attributes on `svg` and `text` nodes.
- Development: updated dependencies, XO lint rules, use absolute imports with `~`, spaces over tabs, `microbundle` over `rollup`, `npm` over `yarn`.
- Updated docs

## [1.2.3](https://github.com/chrisrzhou/react-wordcloud/compare/v1.2.3...v1.2.2) (2020-05-02)

Add `randomSeed` option to provide and control a seed for the random function when `deterministic` option is set to `true`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-wordcloud",
"version": "1.2.3",
"version": "1.2.4",
"description": "Simple React + D3 wordcloud component with powerful features.",
"license": "MIT",
"homepage": "https://react-wordcloud.netlify.com/",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Simple React + D3 wordcloud component with powerful features. Uses the [`d3-clou
## Install

```sh
yarn add react-wordcloud
```
npm install react-wordcloud
``

Note that `react-wordcloud` requires `react^16.13.0` as a peer dependency.

Expand Down
22 changes: 8 additions & 14 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export const defaultOptions = {
};

function ReactWordCloud({
callbacks,
maxWords = 100,
minSize,
options,
size: initialSize,
words,
...rest
callbacks,
maxWords = 100,
minSize,
options,
size: initialSize,
words,
...rest
}) {
const mergedCallbacks = { ...defaultCallbacks, ...callbacks };
const mergedOptions = { ...defaultOptions, ...options };
Expand All @@ -62,13 +62,7 @@ function ReactWordCloud({
}
}, [maxWords, mergedCallbacks, mergedOptions, selection, size, words]);

return (
<div
ref={ref}
style={{ height: '100%', width: '100%' }}
{...rest}
/>
);
return <div ref={ref} style={{ height: '100%', width: '100%' }} {...rest} />;
}

ReactWordCloud.defaultProps = {
Expand Down

0 comments on commit ba3336d

Please sign in to comment.