Skip to content

Commit

Permalink
fix(prop-types): fix missing prop types on various packages
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 18, 2019
1 parent d92a965 commit 8d0fe0d
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/bar/src/BarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ BarItem.propTypes = {
id: PropTypes.string.isRequired,
value: PropTypes.number.isRequired,
indexValue: PropTypes.string.isRequired,
fill: PropTypes.string,
}).isRequired,

x: PropTypes.number.isRequired,
Expand All @@ -113,6 +114,9 @@ BarItem.propTypes = {

theme: PropTypes.shape({
tooltip: PropTypes.shape({}).isRequired,
labels: PropTypes.shape({
text: PropTypes.object.isRequired,
}).isRequired,
}).isRequired,
}

Expand Down
1 change: 1 addition & 0 deletions packages/bump/src/area-bump/AnimatedArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ AnimatedArea.propTypes = {
serie: PropTypes.shape({
id: PropTypes.string.isRequired,
color: PropTypes.string.isRequired,
areaPoints: PropTypes.array.isRequired,
style: PropTypes.shape({
fillOpacity: PropTypes.number.isRequired,
borderWidth: PropTypes.number.isRequired,
Expand Down
1 change: 1 addition & 0 deletions packages/bump/src/area-bump/StaticArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ StaticArea.propTypes = {
serie: PropTypes.shape({
id: PropTypes.string.isRequired,
color: PropTypes.string.isRequired,
areaPoints: PropTypes.array.isRequired,
style: PropTypes.shape({
fillOpacity: PropTypes.number.isRequired,
borderWidth: PropTypes.number.isRequired,
Expand Down
1 change: 1 addition & 0 deletions packages/bump/src/bump/AnimatedLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ AnimatedLine.propTypes = {
serie: PropTypes.shape({
id: PropTypes.string.isRequired,
color: PropTypes.string.isRequired,
linePoints: PropTypes.array.isRequired,
style: PropTypes.shape({
lineWidth: PropTypes.number.isRequired,
opacity: PropTypes.number.isRequired,
Expand Down
1 change: 1 addition & 0 deletions packages/bump/src/bump/StaticLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ StaticLine.propTypes = {
serie: PropTypes.shape({
id: PropTypes.string.isRequired,
color: PropTypes.string.isRequired,
linePoints: PropTypes.array.isRequired,
style: PropTypes.shape({
lineWidth: PropTypes.number.isRequired,
opacity: PropTypes.number.isRequired,
Expand Down
1 change: 1 addition & 0 deletions packages/pie/src/PieSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const PieSlice = ({
PieSlice.propTypes = {
data: PropTypes.shape({
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
label: PropTypes.string.isRequired,
value: PropTypes.number.isRequired,
}).isRequired,

Expand Down
1 change: 1 addition & 0 deletions packages/pie/src/PieTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const PieTooltip = ({ data, color, tooltipFormat, tooltip, theme }) => {
PieTooltip.propTypes = {
data: PropTypes.shape({
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
label: PropTypes.string.isRequired,
value: PropTypes.number.isRequired,
}).isRequired,
color: PropTypes.string.isRequired,
Expand Down
4 changes: 4 additions & 0 deletions packages/sankey/src/SankeyLinksItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ TooltipContent.propTypes = {
source: PropTypes.shape({
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
color: PropTypes.string.isRequired,
}).isRequired,
target: PropTypes.shape({
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
color: PropTypes.string.isRequired,
}).isRequired,
color: PropTypes.string.isRequired,
value: PropTypes.number.isRequired,
Expand Down Expand Up @@ -107,6 +109,8 @@ SankeyLinksItem.propTypes = {
}).isRequired,
color: PropTypes.string.isRequired,
value: PropTypes.number.isRequired,
startColor: PropTypes.string,
endColor: PropTypes.string,
}).isRequired,
layout: PropTypes.oneOf(['horizontal', 'vertical']).isRequired,
path: PropTypes.string.isRequired,
Expand Down
6 changes: 5 additions & 1 deletion packages/sunburst/src/SunburstArc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ const SunburstArc = ({ node, path, borderWidth, borderColor, showTooltip, hideTo
)

SunburstArc.propTypes = {
node: PropTypes.shape({}).isRequired,
node: PropTypes.shape({
data: PropTypes.shape({
color: PropTypes.string.isRequired,
}).isRequired,
}).isRequired,
arcGenerator: PropTypes.func.isRequired,
path: PropTypes.string.isRequired,
borderWidth: PropTypes.number.isRequired,
Expand Down
1 change: 1 addition & 0 deletions packages/swarmplot/src/SwarmPlotTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SwarmPlotTooltip.propTypes = {
node: PropTypes.shape({
label: PropTypes.string.isRequired,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
formattedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
color: PropTypes.string.isRequired,
}).isRequired,
}
Expand Down
1 change: 1 addition & 0 deletions packages/treemap/src/TreeMapNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ TreeMapNode.propTypes = {
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
color: PropTypes.string.isRequired,
fill: PropTypes.string,
borderWidth: PropTypes.number.isRequired,
borderColor: PropTypes.string.isRequired,
labelTextColor: PropTypes.string.isRequired,
Expand Down

0 comments on commit 8d0fe0d

Please sign in to comment.