prop-types#arrayOf JavaScript Examples

The following examples show how to use prop-types#arrayOf. 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: BaseAccordion.js    From discovery-mobile-ui with MIT License 6 votes vote down vote up
BaseAccordion.propTypes = {
  headerCount: number.isRequired,
  resourceIds: arrayOf(string.isRequired).isRequired,
  activeCollectionId: string.isRequired,
  headerLabel: string.isRequired,
  fromDetailsPanel: bool,
  fromDateAccordion: bool,
  maxRecordsCount: number,
  fromTimeSavedAccordion: bool,
};
Example #2
Source File: proptypes-shapes.js    From what-front with MIT License 6 votes vote down vote up
studentGroupShape = {
  id: number.isRequired,
  courseId: number.isRequired,
  name: string.isRequired,
  startDate: string.isRequired,
  finishDate: string.isRequired,
  studentIds: arrayOf(number).isRequired,
  mentorIds: arrayOf(number).isRequired,
}
Example #3
Source File: commonTypes.js    From material-ui-color with MIT License 6 votes vote down vote up
color = oneOfType([
  shape({
    css: shape({
      // TODO
    }),
    value: number,
    hex: string,
    raw: oneOfType([string, array, number, shape]),
    name: string,
    alpha: number,
    rgb: arrayOf(number),
    hsv: arrayOf(number),
    hsl: arrayOf(number),
  }),
  string,
  number,
])
Example #4
Source File: Puppeteer.props.js    From webrix with Apache License 2.0 6 votes vote down vote up
propTypes = {
    puppeteer: {
        children: node,
        props: shape({}),
        namespace: string,
    },
    break: {
        children: node,
        props: arrayOf(string),
        namespace: string,
    },
}
Example #5
Source File: index.js    From study-chain with MIT License 6 votes vote down vote up
blockHashType = shape({
  blockhash: string,
  blocknum: number,
  channelname: string,
  creatdt: string,
  datahash: string,
  prehash: string,
  txcount: number,
  txhash: arrayOf(string)
})
Example #6
Source File: TableToolbar.jsx    From Spoke with MIT License 6 votes vote down vote up
TableToolbar.propTypes = {
  rowSizeList: arrayOf(PropTypes.number),
  rowSize: PropTypes.number.isRequired,
  page: PropTypes.number.isRequired,
  count: PropTypes.number.isRequired,
  onRowSizeChange: PropTypes.func.isRequired,
  onPreviousPageClick: PropTypes.func.isRequired,
  onNextPageClick: PropTypes.func.isRequired,
  borderBottom: PropTypes.bool,
  borderTop: PropTypes.bool
};
Example #7
Source File: index.js    From study-chain with MIT License 6 votes vote down vote up
chartDataType = shape({
  dataMax: number.isRequired,
  displayData: arrayOf(
    shape({
      count: string,
      datetime: string
    })
  ).isRequired
})
Example #8
Source File: CollectionsDialog.js    From discovery-mobile-ui with MIT License 6 votes vote down vote up
CollectionsDialog.propTypes = {
  collectionsDialogText: shape({}).isRequired,
  setCollectionsDialogText: func.isRequired,
  collectionId: string,
  collectionLabel: string,
  deleteCollectionAction: func.isRequired,
  renameCollectionAction: func.isRequired,
  duplicateCollectionAction: func.isRequired,
  collectionsLabels: arrayOf(string.isRequired).isRequired,
  createCollectionAction: func.isRequired,
};
Example #9
Source File: index.js    From study-chain with MIT License 6 votes vote down vote up
channelsType = arrayOf(
  shape({
    blocks: number,
    channel_hash: string,
    channelname: string,
    createdat: string,
    channel_genesis_hash: string,
    id: number,
    transactions: number
  })
)
Example #10
Source File: CollectionIcon.js    From discovery-mobile-ui with MIT License 6 votes vote down vote up
CollectionIcon.propTypes = {
  collectionId: string.isRequired,
  resourceIds: arrayOf(string.isRequired).isRequired,
  showCount: bool.isRequired,
  addResourceToCollectionAction: func.isRequired,
  removeResourceFromCollectionAction: func.isRequired,
  collectionResourceIds: shape({}).isRequired,
  showCollectionOnly: bool.isRequired,
};
Example #11
Source File: profile.js    From gatsby-theme-intro with MIT License 6 votes vote down vote up
ProfileType = {
  about: string.isRequired,
  budget: shape({
    currency: string.isRequired,
    default: number.isRequired,
    max: number.isRequired,
    min: number.isRequired,
  }).isRequired,
  company: string.isRequired,
  focus: string.isRequired,
  focus_url: string,
  for_hire: bool.isRequired,
  image: shape({
    childImageSharp: object.isRequired,
    publicURL: string.isRequired,
  }),
  initials: string.isRequired,
  location: string.isRequired,
  name: string.isRequired,
  profession: string.isRequired,
  relocation: bool.isRequired,
  skills: arrayOf(string).isRequired,
  tools: arrayOf(string).isRequired,
}
Example #12
Source File: types.js    From supportal-frontend with MIT License 6 votes vote down vote up
LeadType = shape({
  id: number.isRequired,
  person: shape({
    first_name: string.isRequired,
    last_name: string.isRequired,
    phone: string.isRequired,
    city: string.isRequired,
    state: string.isRequired,
  }),
  created_at: string.isRequired,
  expired_at: string,
  status: oneOf(LEAD_STATUSES),
  vol_prospect_contact_events: arrayOf(VolProspectContactEventType),
})
Example #13
Source File: Slider.js    From wix-style-react with MIT License 6 votes vote down vote up
Slider.propTypes = {
  /** Allows the slider's handles to cross. */
  allowCross: PropTypes.bool,
  dataHook: PropTypes.string,

  /** Controls the visibility of the marks. */
  displayMarks: PropTypes.bool,

  /** Controls visibility of slide handle tooltip */
  displayTooltip: PropTypes.bool,
  id: PropTypes.string,

  /** The absolute maximum of the slider's range */
  max: PropTypes.number,

  /** The absolute minimum of the slider's range */
  min: PropTypes.number,

  /** Called after every value change */
  onAfterChange: PropTypes.func,

  /** Called upon every value change */
  onChange: PropTypes.func.isRequired,

  /** Adjust for RTL dir. */
  rtl: PropTypes.bool,

  /** The slider's step */
  step: PropTypes.number,

  /** Allow pushing of surrounding handles when moving a handle. Number means a minimum distance between handles */
  pushable: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),

  /** The slider's selected range */
  value: oneOfType([arrayOf(PropTypes.number), number]),

  /** Make it disabled */
  disabled: PropTypes.bool,
};
Example #14
Source File: DrinkResults.js    From Simplify-Testing-with-React-Testing-Library with MIT License 6 votes vote down vote up
DrinkResults.propTypes = {
  drinks: PropTypes.arrayOf(
    PropTypes.shape({
      idDrink: PropTypes.string.isRequired,
      strDrinkThumb: PropTypes.string.isRequired,
      strDrink: PropTypes.string.isRequired,
      strInstructions: PropTypes.string.isRequired
    })
  ).isRequired
}
Example #15
Source File: proptypes-shapes.js    From what-front with MIT License 6 votes vote down vote up
studentGroupShape = {
  id: number.isRequired,
  courseId: number.isRequired,
  name: string.isRequired,
  startDate: string.isRequired,
  finishDate: string.isRequired,
  studentIds: arrayOf(number).isRequired,
  mentorIds: arrayOf(number).isRequired,
}
Example #16
Source File: index.js    From juggernaut-desktop with MIT License 6 votes vote down vote up
nodeDetailsType = shape({
  lastUpdate: number.isRequired,
  pubKey: string.isRequired,
  alias: string.isRequired,
  color: string.isRequired,
  addresses: arrayOf(addressType),
  numChannels: number.isRequired,
  totalCapacity: number.isRequired,
  remoteChannels: arrayOf(remoteChannelType),
  channels: arrayOf(channelType),
  pendingChannels: arrayOf(pendingChannelType),
  peer: peerType
})
Example #17
Source File: types.js    From supportal-frontend with MIT License 6 votes vote down vote up
MobilizeEventType = shape({
  tags: arrayOf(
    shape({
      id: number,
      name: string,
    })
  ),
  event_type: string,
  browser_url: string,
  description: string,
  title: string,
  high_priority: bool,
  timeslots: arrayOf(MobilizeTimeslotType),
  id: number,
  timezone: string,
  location: MobilizeLocationType,
})
Example #18
Source File: Dialog.jsx    From Turnip-Calculator with MIT License 5 votes vote down vote up
ShareDialog.propTypes = {
  open: bool.isRequired,
  filters: arrayOf(number).isRequired,
  onClose: func.isRequired,
};
Example #19
Source File: BaseSegmentControl.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
BaseSegmentControl.propTypes = {
  enabled: bool.isRequired,
  values: arrayOf(string.isRequired).isRequired,
  selectedIndex: number.isRequired,
  onChange: func.isRequired,
  activeColor: string,
  activeFontColor: string,
};
Example #20
Source File: Table.jsx    From Turnip-Calculator with MIT License 5 votes vote down vote up
PatternRow.propTypes = {
  pattern: arrayOf(arrayOf(number)).isRequired,
  name: string.isRequired,
  onClick: func,
  open: bool,
};
Example #21
Source File: DateAccordionsContainer.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
DateAccordionsContainer.propTypes = {
  savedRecordsByRecordDate: arrayOf(shape({}).isRequired).isRequired,
  fromDetailsPanel: bool.isRequired,
};
Example #22
Source File: Table.jsx    From Turnip-Calculator with MIT License 5 votes vote down vote up
DataRows.propTypes = {
  patterns: arrayOf(arrayOf(arrayOf(number))),
  minMaxPattern: arrayOf(arrayOf(number)),
  quantiles: arrayOf(arrayOf(number)),
  filters: arrayOf(number),
  expanded: bool,
};
Example #23
Source File: OBNavigation.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
OBNavigation.propTypes = {
  isFirstScreen: bool,
  isLastScreen: bool,
  dotNav: arrayOf(number.isRequired),
  handlePressBack: func.isRequired,
  handlePressNext: func.isRequired,
  handleOnboardingState: func.isRequired,
};
Example #24
Source File: FilterDropdown.jsx    From covid-trials-dashboard with MIT License 5 votes vote down vote up
FilterDropdown.propTypes = {
  label: string,
  filters: arrayOf(string),
  handleSelected: func,
  selected: arrayOf(string),
}
Example #25
Source File: EncounterCardBody.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
EncounterCardBody.propTypes = {
  resource: shape({}).isRequired,
  serviceProvider: shape({}).isRequired,
  participants: arrayOf(shape({})).isRequired,
};
Example #26
Source File: Forecaster.jsx    From Turnip-Calculator with MIT License 5 votes vote down vote up
Forecaster.propTypes = {
  filter: arrayOf(number).isRequired,
};
Example #27
Source File: proptypes-shapes.js    From what-front with MIT License 5 votes vote down vote up
studentGroupsStateShape = {
  error: string.isRequired,
  isLoading: bool.isRequired,
  isLoaded: bool.isRequired,
  studentGroups: oneOfType([arrayOf(shape(studentGroupShape)), arrayOf(undefined)]).isRequired,
  studentGroupById: oneOfType([shape(studentGroupShape), object]).isRequired,
}
Example #28
Source File: commonTypes.js    From material-ui-color with MIT License 5 votes vote down vote up
inputFormats = arrayOf(string)
Example #29
Source File: proptypes-shapes.js    From what-front with MIT License 5 votes vote down vote up
coursesStateShape = {
  error: string.isRequired,
  isLoading: bool.isRequired,
  loaded: bool.isRequired,
  data: oneOfType([arrayOf(shape(courseShape)), arrayOf(undefined)]).isRequired,
}