prop-types#PropTypes JavaScript Examples

The following examples show how to use prop-types#PropTypes. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PatientPage.js    From SaraAlert with Apache License 2.0 6 votes vote down vote up
PatientPage.propTypes = {
  patient_id: PropTypes.string,
  current_user: PropTypes.object,
  patient: PropTypes.object,
  group_members: PropTypes.array,
  dashboardUrl: PropTypes.string,
  authenticity_token: PropTypes.string,
  patient_submission_token: PropTypes.string,
  canAddAssessments: PropTypes.bool,
  hideBody: PropTypes.bool,
  jurisdictionPath: PropTypes.string,
Example #2
Source File: ReactPerfectScrollbar.jsx    From chat-ui-kit-react with MIT License 6 votes vote down vote up
ScrollBar.propTypes = {
  children: PropTypes.node.isRequired,
  className: PropTypes.string,
  style: PropTypes.object,
  option: PropTypes.object,
  options: PropTypes.object,
  containerRef: PropTypes.func,
  onScrollY: PropTypes.func,
  onScrollX: PropTypes.func,
  onScrollUp: PropTypes.func,
  onScrollDown: PropTypes.func,
  onScrollLeft: PropTypes.func,
  onScrollRight: PropTypes.func,
  onYReachStart: PropTypes.func,
  onYReachEnd: PropTypes.func,
  onXReachStart: PropTypes.func,
  onXReachEnd: PropTypes.func,
  onSync: PropTypes.func,
  component: PropTypes.string,
Example #3
Source File: DialogBox.js    From inventory-management-web with MIT License 6 votes vote down vote up
DialogBox.propTypes = {
  open: PropTypes.bool.isRequired,
  handleClose: PropTypes.func.isRequired,
  handleClick: PropTypes.func,
  handleDelete: PropTypes.func,
  // eslint-disable-next-line react/forbid-prop-types
  selectedRow: PropTypes.object,
  number: PropTypes.string.isRequired,
Example #4
Source File: Sidebar.js    From covidsos with MIT License 6 votes vote down vote up
Sidebar.propTypes = {
  // links that will be displayed inside the component
  routes: PropTypes.arrayOf(PropTypes.object),
  logo: PropTypes.shape({
    // innerLink is for links that will direct the user within the app
    // it will be rendered as <Link to="...">...</Link> tag
    innerLink: PropTypes.string,
    // outterLink is for links that will direct the user outside the app
    // it will be rendered as simple <a href="...">...</a> tag
    outterLink: PropTypes.string,
    // the image src of the logo
    imgSrc: PropTypes.string.isRequired,
    // the alt for the img
    imgAlt: PropTypes.string.isRequired
Example #5
Source File: propTypes.js    From lrc-staking-dapp with MIT License 6 votes vote down vote up
propTypes = {
  classes: PropTypes.object.isRequired,
  description: PropTypes.string.isRequired,
  image: PropTypes.string.isRequired,
  isLocked: PropTypes.bool.isRequired,
  messages: PropTypes.object.isRequired,
  onClick: PropTypes.func.isRequired,
  title: PropTypes.string.isRequired,
  waitingTime: PropTypes.number.isRequired,
Example #6
Source File: Patient.js    From SaraAlert with Apache License 2.0 5 votes vote down vote up
Patient.propTypes = {
  patient: PropTypes.object,
  group_members: PropTypes.array,
  details: PropTypes.object,
  jurisdictionPath: PropTypes.string,
  goto: PropTypes.func,
  hideBody: PropTypes.bool,
Example #7
Source File: AllSubscriptionsHOC.jsx    From HACC-Hui with MIT License 5 votes vote down vote up
 * Higher order component that waits for the subscriptions.
 * @param WrappedComponent {React.Component} the wrapped component.
 * @return {React.Component} The WrappedComponent with subscriptions.
 * @memberOf ui/layouts
function withAllSubscriptions(WrappedComponent) {
  const AllSubscriptionsHOC = (props) => ((props.loading) ? (
              <Loader active>Getting data.</Loader>
          ) :
          <WrappedComponent {...props} />
  AllSubscriptionsHOC.propTypes = {
    loading: PropTypes.bool,

  return withTracker(() => {
    const handles = [
    const loading = handles.some((handle) => !handle.ready());
    return {

Example #8
Source File: index.jsx    From react-antd-admin-template with MIT License 5 votes vote down vote up
Mallki.propTypes = {
  className: PropTypes.string,
  text: PropTypes.string,
Example #9
Source File: Container.js    From inventory-management-web with MIT License 5 votes vote down vote up
AdminRoute.propTypes = {
  children: PropTypes.oneOfType([
  path: PropTypes.string.isRequired,
Example #10
Source File: StorageContextProvider.jsx    From covid with GNU General Public License v3.0 5 votes vote down vote up
ContextProvider.propTypes = {
  // How to handle URL hash storage
  pathFilter: PropTypes.string.isRequired,
  paramsFilter: PropTypes.func.isRequired,
  paramsToString: PropTypes.func.isRequired
Example #11
Source File: UserProfile.jsx    From crypto-manager with MIT License 5 votes vote down vote up
UserProfile.propTypes = {
  classes: PropTypes.object.isRequired,
Example #12
Source File: Choice.js    From label-studio-frontend with Apache License 2.0 5 votes vote down vote up
ChoiceComponent.propTypes = {
  children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
  value: PropTypes.string.isRequired,
  checked: PropTypes.bool,
  defaultChecked: PropTypes.bool,
  hint: PropTypes.string,
  onChange: PropTypes.func,
Example #13
Source File: Landing.js    From EmployeeManagementSystem with MIT License 5 votes vote down vote up
Landing.propTypes = {
  auth: PropTypes.object.isRequired
Example #14
Source File: App.view.js    From kafka-java-vertx-starter with Apache License 2.0 5 votes vote down vote up
App.propTypes = {
  consumer: PropTypes.bool,
  producer: PropTypes.bool,
  className: PropTypes.string,
  websocketFactory: PropTypes.func.isRequired,
Example #15
Source File: OrderDocumentRequest.js    From react-invenio-app-ils with MIT License 5 votes vote down vote up
OrderDocumentRequest.propTypes = {
  orderId: PropTypes.object,
Example #16
Source File: constructor-list-base-price.js    From horondi_admin with MIT License 5 votes vote down vote up
ConstructorListBasePrice.propTypes = {
  expanded: PropTypes.string,
  handleChange: PropTypes.func,
  setBasePriceToAdd: PropTypes.func,
  basePriceToAdd: PropTypes.number
Example #17
Source File: HomeScreen.js    From iitj-canteen with GNU General Public License v3.0 5 votes vote down vote up
HomeScreen.propTypes = {
	token: PropTypes.string,
	loading: PropTypes.bool