Skip to content

Commit

Permalink
fix(chartcards): update axes proptypes to oneOf top
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Stone committed Aug 3, 2020
1 parent c99807a commit fe0ea97
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/TimeSeriesCard/TimeSeriesCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const TimeSeriesCardPropTypes = {
/** Optionally addes a zoom bar to the chart */
zoomBar: PropTypes.shape({
/** Determines which axis to put the zoomBar */
axes: PropTypes.string,
axes: PropTypes.oneOf(['top']), // top is the only axes supported right now
// axes: PropTypes.oneOf(['top', 'bottom', 'left', 'right']), // TODO: When the other axes are supported, swap to this proptype
/** Determines whether the zoomBar is enabled */
enabled: PropTypes.bool,
/** Optional domain to zoom to by default. Can be a timestamp or date string */
Expand Down
3 changes: 2 additions & 1 deletion src/constants/CardPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ export const BarChartCardPropTypes = {
/** Optionally addes a zoom bar to the chart */
zoomBar: PropTypes.shape({
/** Determines which axis to put the zoomBar */
axes: PropTypes.string,
axes: PropTypes.oneOf(['top']), // top is the only axes supported right now
// axes: PropTypes.oneOf(['top', 'bottom', 'left', 'right']), // TODO: When the other axes are supported, swap to this proptype
/** Determines whether the zoomBar is enabled */
enabled: PropTypes.bool,
/** Optional domain to zoom to by default. Can be a timestamp or date string */
Expand Down
14 changes: 12 additions & 2 deletions src/utils/__tests__/__snapshots__/publicAPI.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4430,7 +4430,12 @@ Map {
"args": Array [
Object {
"axes": Object {
"type": "string",
"args": Array [
Array [
"top",
],
],
"type": "oneOf",
},
"enabled": Object {
"type": "bool",
Expand Down Expand Up @@ -9302,7 +9307,12 @@ Map {
"args": Array [
Object {
"axes": Object {
"type": "string",
"args": Array [
Array [
"top",
],
],
"type": "oneOf",
},
"enabled": Object {
"type": "bool",
Expand Down

0 comments on commit fe0ea97

Please sign in to comment.