How to use the airbnb-prop-types.between function in airbnb-prop-types

To help you get started, we’ve selected a few airbnb-prop-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airbnb / lunar / packages / core / src / components / ProgressBar / index.tsx View on Github external
<div style="{{">
      </div>
    
  );
}

ProgressBar.propTypes = {
  percent: between({ gte: 0, lte: 100 }).isRequired,
};

export default ProgressBar;
github edx / paragon / src / Pagination / index.jsx View on Github external
pageOfCount: 'of',
}
``` */
  buttonLabels: PropTypes.shape({
    previous: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
    next: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
    page: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
    currentPage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
    pageOfCount: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
  }),
  /** specifies any class name(s) for the `Pagination` component. The default is an empty string. */
  className: PropTypes.string,
  /** specifies the page that the `Pagination` component will automatically select. The default is `1`. */
  currentPage: PropTypes.number,
  /** specifies the number of page buttons to display in between the `Previous` and `Next` buttons. This number also includes any ellipses in the total count. Also, to ensure that at least one clickable page button is shown when both ellipses are displayed, this value must be greater than `4`.  The default is `7`. */
  maxPagesDisplayed: between({ gt: 4 }),
};

export default Pagination;