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: 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 #2
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 #3
Source File: index.js    From juggernaut-desktop with MIT License 6 votes vote down vote up
nodeType = shape({
  lastUpdate: number.isRequired,
  pubKey: string.isRequired,
  alias: string.isRequired,
  color: string.isRequired,
  addresses: arrayOf(nodeAddressType),
  stats: nodeStatsType,
  twoHopNodes: number.isRequired
})
Example #4
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 #5
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 #6
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 #7
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 #8
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 #9
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 #10
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 #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: 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 #13
Source File: Chart.jsx    From Turnip-Calculator with MIT License 5 votes vote down vote up
ChartComponent.propTypes = {
  filters: arrayOf(number).isRequired,
  minMaxPattern: arrayOf(arrayOf(number)),
  minWeekValue: number,
  patterns: arrayOf(arrayOf(arrayOf(number))),
  quantiles: arrayOf(arrayOf(number)),
};
Example #14
Source File: protected-route.js    From what-front with MIT License 5 votes vote down vote up
ProtectedRoute.propTypes = {
  roles: arrayOf(number).isRequired,
};
Example #15
Source File: commonTypes.js    From material-ui-color with MIT License 5 votes vote down vote up
inputFormats = arrayOf(string)
Example #16
Source File: index.js    From study-chain with MIT License 5 votes vote down vote up
blockPerHourType = arrayOf(
  shape({
    count: string,
    datetime: string
  })
)
Example #17
Source File: index.js    From discovery-mobile-ui with MIT License 5 votes vote down vote up
Catalog.propTypes = {
  collection: shape({}).isRequired,
  selectedRecordsGroupedByType: arrayOf(shape({}).isRequired).isRequired,
  navigation: shape({}).isRequired,
  timelineIntervals: shape({}).isRequired,
};