Skip to content

Commit

Permalink
feat(stack): rename StackDots to StackSlicer
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Benitte committed May 9, 2016
1 parent f797073 commit 69256ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- Stack
- [`<Stack />`](https://plouc.github.io/nivo/#/stack)
- [`<ResponsiveStack />`](https://plouc.github.io/nivo/#/stack)
- [`<StackDots />`](https://plouc.github.io/nivo/#/stack)
- [`<StackSlicer />`](https://plouc.github.io/nivo/#/stack)
- TreeMap
- [`<TreeMapD3 />`](https://plouc.github.io/nivo/#/treemap/d3)
- [`<ResponsiveTreeMapD3 />`](https://plouc.github.io/nivo/#/treemap/d3)
Expand Down
2 changes: 1 addition & 1 deletion src/ColorUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const getColorGenerator = instruction => {
return d => d3.rgb(d.color || d.data.color)[method](parseFloat(amount));
}

throw new Error('Unable to determine color generator');
return instruction;
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const overTransitionDuration = 200;
const overTransitionEasing = 'linear';


class StackDots extends Component {
class StackSlicer extends Component {
static decorateStack(element) {
const { props } = element;

Expand Down Expand Up @@ -195,22 +195,22 @@ class StackDots extends Component {
render() {
invariant(
false,
'<StackDots> element is for Stack configuration only and should not be rendered'
'<StackSlicer> element is for Stack configuration only and should not be rendered'
);
}
}

const { number, bool, any } = PropTypes;

StackDots.propTypes = {
StackSlicer.propTypes = {
showOnOver: bool.isRequired,
radius: number.isRequired,
color: any.isRequired,
borderWidth: number.isRequired,
borderColor: any.isRequired
};

StackDots.defaultProps = {
StackSlicer.defaultProps = {
showOnOver: false,
radius: 4,
color: 'inherit',
Expand All @@ -219,4 +219,4 @@ StackDots.defaultProps = {
};


export default StackDots;
export default StackSlicer;
2 changes: 1 addition & 1 deletion src/components/charts/stack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

export Stack from './Stack';
export ResponsiveStack from './ResponsiveStack';
export StackDots from './StackDots';
export StackSlicer from './StackSlicer';

0 comments on commit 69256ab

Please sign in to comment.