packages/victory-core/src/victory-util/axis.js
function getAxisComponent(childComponents, axis) {
  const matchesAxis = (component) => {
    const type = component.type.getAxis(component.props);
    return type === axis;
  };
  return findAxisComponents(childComponents, matchesAxis)[0];
}
function getAxisComponent(childComponents, axis) {
  const matchesAxis = (component) => {
    const type = component.type.getAxis(component.props);
    return type === axis;
  };
  return findAxisComponents(childComponents, matchesAxis)[0];
}
Returns a single axis component of the desired axis type (x or y)
@param {Array} childComponents: an array of children
@param {String} axis: desired axis either "x" or "y".
@returns {ReactComponent} an axis component of the desired axis or undefined