Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Add prop types package #65

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/charts-react-axis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"react": "^15.4.2",
"react-test-renderer": "^15.4.2",
"rimraf": "^2.5.4"
},
"dependencies": {
"prop-types": "^15.6.0"
}
}
3 changes: 2 additions & 1 deletion packages/charts-react-axis/src/BottomAxis.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 PropTypes from 'prop-types';
import XTick from './XTick';

const pathStyle = {
Expand Down
3 changes: 2 additions & 1 deletion packages/charts-react-axis/src/LeftAxis.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 PropTypes from 'prop-types';
import YTick from './YTick';

const pathStyle = {
Expand Down
3 changes: 2 additions & 1 deletion packages/charts-react-axis/src/XTick.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 PropTypes from 'prop-types';

const XTick = (props) => {
const { label, offset } = props;
Expand Down
3 changes: 2 additions & 1 deletion packages/charts-react-axis/src/YTick.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 PropTypes from 'prop-types';

const YTick = (props) => {
const { label, offset } = props;
Expand Down
3 changes: 3 additions & 0 deletions packages/charts-react-chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
"react": "^15.4.2",
"react-test-renderer": "^15.4.2",
"rimraf": "^2.5.4"
},
"dependencies": {
"prop-types": "^15.6.0"
}
}
3 changes: 2 additions & 1 deletion packages/charts-react-chart/src/index.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 PropTypes from 'prop-types';

export default class Chart extends React.PureComponent {
static propTypes = {
Expand Down
1 change: 1 addition & 0 deletions packages/charts-react-line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"d3-scale": "^1.0.4",
"d3-shape": "^1.0.4",
"d3-time-format": "^2.0.3",
"prop-types": "^15.6.0",
"react": "^15.4.2"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/charts-react-line/src/Line.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 PropTypes from 'prop-types';

const path = {
fill: 'none',
Expand Down
3 changes: 2 additions & 1 deletion packages/charts-react-line/src/LineChart.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 PropTypes from 'prop-types';
import * as shape from 'd3-shape';
import Chart from '@ibm-design/charts-react-chart';
import { LeftAxis, BottomAxis } from '@ibm-design/charts-react-axis';
Expand Down
3 changes: 3 additions & 0 deletions packages/charts-react-test-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
"babel-cli": "^6.18.0",
"react": "^15.4.2",
"rimraf": "^2.5.4"
},
"dependencies": {
"prop-types": "^15.6.0"
}
}
5 changes: 3 additions & 2 deletions packages/charts-react-test-helpers/src/ChartProvider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';

/**
* It's helpful to leverage component in test scenarios where you're relying on
Expand All @@ -9,11 +10,11 @@ import React from 'react';
export default class ChartProvider extends React.PureComponent {
static propTypes = {
// eslint-disable-next-line react/forbid-prop-types
children: React.PropTypes.any,
children: PropTypes.any,
}

static childContextTypes = {
chart: React.PropTypes.object,
chart: PropTypes.object,
}

getChildContext() {
Expand Down