Skip to content

Commit

Permalink
Merge pull request SpareBank1#2 in FFE/ffe-chart-donut-react from mas…
Browse files Browse the repository at this point in the history
…ter_use-prop-types-package to master

* commit '38aa383796c7b157d742a6576cc5ff69e1c52ebf':
  * Use PropTypes from prop-types package
  • Loading branch information
orhels committed Sep 6, 2017
2 parents 255c159 + 89bd8c2 commit cd98b84
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog for ffe-chart-donut-react

## v.1.0.1
* Use PropTypes from prop-types package

## v.1.0.0
* First release.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffe-chart-donut-react",
"version": "1.0.0",
"version": "1.0.1",
"description": "Donut chart in SVG",
"scripts": {
"build": "babel -d lib/ src/ && cp src/ffe-chart-donut.less lib/",
Expand All @@ -21,6 +21,9 @@
"keywords": [
"ffe"
],
"dependencies": {
"prop-types": "*"
},
"peerDependencies": {
"react": "^15.4.0"
},
Expand Down
11 changes: 6 additions & 5 deletions src/ChartDonut.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import { number, string } from 'prop-types';

const NON_BREAKING_SPACE = '\u00A0';

Expand Down Expand Up @@ -93,10 +94,10 @@ function ChartDonut({ name, percentage, firstLabel, lastLabel }) {
}

ChartDonut.propTypes = {
firstLabel: PropTypes.string.isRequired,
lastLabel: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
percentage: PropTypes.number.isRequired,
firstLabel: string.isRequired,
lastLabel: string.isRequired,
name: string.isRequired,
percentage: number.isRequired,
};

export default ChartDonut;

0 comments on commit cd98b84

Please sign in to comment.