How to use the @shoutem/ui.DropDownMenu.propTypes function in @shoutem/ui

To help you get started, we’ve selected a few @shoutem/ui 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 shoutem / extensions / shoutem.cms / app / screens / CmsListScreen.js View on Github external
// The parent category that is used to display
    // the available categories in the drop down menu
    parentCategory: PropTypes.any,
    // CMS categories of the primary data
    categories: PropTypes.array.isRequired,
    // Primary CMS data to display
    data: PropTypes.array.isRequired,
    // The shortcut title
    title: PropTypes.string.isRequired,
    // The currently selected category on this screen
    selectedCategory: PropTypes.object,
    style: PropTypes.shape({
      screen: Screen.propTypes.style,
      list: ListView.propTypes.style,
      emptyState: EmptyStateView.propTypes.style,
      categories: DropDownMenu.propTypes.style,
    }),

    // actions
    find: PropTypes.func.isRequired,
    next: PropTypes.func.isRequired,
    clear: PropTypes.func.isRequired,
    setScreenState: PropTypes.func.isRequired,
  };

  static defaultProps = {
    style: {
      screen: {},
      list: {},
      emptyState: {},
      categories: {},
    },