How to use @times-components/pagination - 8 common examples

To help you get started, we’ve selected a few @times-components/pagination 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 newsuk / times-components / packages / author-profile / author-profile-pagination.js View on Github external
},
  spacing: {
    flex: 1,
    maxWidth: 800
  }
});

const AuthorProfilePagination = props => (
  
);

AuthorProfilePagination.propTypes = Pagination.propTypes;
export default AuthorProfilePagination;
github newsuk / times-components / packages / author-profile / author-profile-footer.js View on Github external
);

AuthorProfileFooter.propTypes = {
  count: Pagination.propTypes.count,
  generatePageLink: Pagination.propTypes.generatePageLink,
  onNext: PropTypes.func,
  onPrev: PropTypes.func,
  page: Pagination.propTypes.page,
  pageSize: Pagination.propTypes.pageSize
};

AuthorProfileFooter.defaultProps = {
  count: 0,
  page: 0,
  generatePageLink: page => `?page=${page}`,
  onNext: () => {},
  onPrev: () => {},
  pageSize: 20
};
github newsuk / times-components / packages / author-profile / author-profile-content-prop-types.js View on Github external
import PropTypes from "prop-types";
import AuthorHead from "@times-components/author-head";
import Pagination from "@times-components/pagination";

export const propTypes = {
  ...AuthorHead.propTypes,
  ...Pagination.propTypes,
  articles: PropTypes.arrayOf(PropTypes.shape()),
  articlesLoading: PropTypes.bool,
  isLoading: PropTypes.bool,
  onArticlePress: PropTypes.func,
  onViewed: PropTypes.func,
  receiveChildList: PropTypes.func
};

export const defaultProps = {
  articles: [],
  onViewed: () => {},
  receiveChildList: () => {}
};
github newsuk / times-components / packages / author-profile / author-profile-header.js View on Github external
);
};

AuthorProfileHeader.propTypes = {
  biography: AuthorHead.propTypes.bio,
  count: Pagination.propTypes.count,
  image: AuthorHead.propTypes.uri,
  generatePageLink: Pagination.propTypes.generatePageLink,
  jobTitle: AuthorHead.propTypes.title,
  name: AuthorHead.propTypes.name,
  onNext: PropTypes.func,
  onPrev: PropTypes.func,
  page: Pagination.propTypes.page,
  pageSize: Pagination.propTypes.pageSize,
  twitter: AuthorHead.propTypes.twitter,
  onTwitterLinkPress: PropTypes.func.isRequired
};

AuthorProfileHeader.defaultProps = {
  count: 0,
  biography: null,
  page: 0,
  generatePageLink: page => `?page=${page}`,
  image: null,
  jobTitle: null,
  name: null,
  onNext: () => {},
  onPrev: () => {},
  pageSize: 20,
github newsuk / times-components / packages / author-profile / author-profile-header.js View on Github external
return (
    
  );
};

AuthorProfileHeader.propTypes = {
  biography: AuthorHead.propTypes.bio,
  count: Pagination.propTypes.count,
  image: AuthorHead.propTypes.uri,
  generatePageLink: Pagination.propTypes.generatePageLink,
  jobTitle: AuthorHead.propTypes.title,
  name: AuthorHead.propTypes.name,
  onNext: PropTypes.func,
  onPrev: PropTypes.func,
  page: Pagination.propTypes.page,
  pageSize: Pagination.propTypes.pageSize,
  twitter: AuthorHead.propTypes.twitter,
  onTwitterLinkPress: PropTypes.func.isRequired
};

AuthorProfileHeader.defaultProps = {
  count: 0,
  biography: null,
  page: 0,
github newsuk / times-components / packages / author-profile / author-profile-footer.js View on Github external
count={count}
        hideResults
        generatePageLink={generatePageLink}
        onNext={onNext}
        onPrev={onPrev}
      />
    
  
);

AuthorProfileFooter.propTypes = {
  count: Pagination.propTypes.count,
  generatePageLink: Pagination.propTypes.generatePageLink,
  onNext: PropTypes.func,
  onPrev: PropTypes.func,
  page: Pagination.propTypes.page,
  pageSize: Pagination.propTypes.pageSize
};

AuthorProfileFooter.defaultProps = {
  count: 0,
  page: 0,
  generatePageLink: page => `?page=${page}`,
  onNext: () => {},
  onPrev: () => {},
  pageSize: 20
};

export default AuthorProfileFooter;
github newsuk / times-components / packages / author-profile / src / author-profile.js View on Github external
page={page}
              pageSize={pageSize}
              refetch={refetchArticles}
              showImages={hasLeadAssets}
            />
          
        );
      }}
    
  );
};

AuthorProfile.propTypes = propTypes;
AuthorProfile.defaultProps = defaultProps;

export default withPageState(authorProfileTrackingContext(AuthorProfile));
github newsuk / times-components / packages / topic / src / topic.js View on Github external
page={page}
              pageSize={pageSize}
              refetch={refetchArticles}
              showImages
            />
          
        );
      }}
    
  );
};

Topic.propTypes = propTypes;
Topic.defaultProps = defaultProps;

export default withPageState(topicTrackingContext(Topic));

@times-components/pagination

The pagination package provides a pagination user interface (UI) and pagination state Higher Order Component (HOC). These two exports are both required for pagination to work. This package is currently only used by article list pages (author profile and t

BSD-3-Clause
Latest version published 18 days ago

Package Health Score

85 / 100
Full package analysis