How to use the @shoutem/ui.EmptyStateView.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
screenId: PropTypes.string.isRequired,
    // 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: {},
github shoutem / extensions / shoutem.application / app / screens / RemoteDataListScreen.js View on Github external
export default class RemoteDataListScreen extends PureComponent {
  static propTypes = {
    // The shortcut title
    title: string,

    // Data items to display
    // eslint-disable-next-line  react/forbid-prop-types
    data: array,

    // Actions
    next: func.isRequired,
    // Component style
    style: shape({
      screen: Screen.propTypes.style,
      list: ListView.propTypes.style,
      emptyState: EmptyStateView.propTypes.style,
    }),
  };

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

  constructor(props, context) {
    super(props, context);
    this.fetchData = this.fetchData.bind(this);
    this.loadMore = this.loadMore.bind(this);
  }