@material-ui/icons#KeyboardArrowLeft TypeScript Examples

The following examples show how to use @material-ui/icons#KeyboardArrowLeft. 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: index.tsx    From SpaceEye with MIT License 6 votes vote down vote up
public render(): React.ReactNode {
        return (
            <Dialog open={this.props.show} style={{ userSelect: 'none' }}>
                {this.state.pages
                    .filter((_, index) => this.state.currentIndex === index)
                    .map(Page => (
                        <Page
                            index={this.state.currentIndex}
                            next={this.increment}
                            previous={this.decrement}
                            key={this.state.currentIndex}
                            addPage={this.addPage}
                            removePage={this.removePage}
                        />
                    ))}
                <MobileStepper
                    variant="dots"
                    steps={this.count()}
                    position="static"
                    activeStep={this.state.currentIndex}
                    nextButton={<Box mx={5} my={2} />}
                    backButton={
                        this.state.currentIndex !== 0 ? (
                            <Button size="small" onClick={this.decrement}>
                                <KeyboardArrowLeft />
                                Back
                            </Button>
                        ) : (
                            <Box mx={5} my={2} />
                        )
                    }
                />
            </Dialog>
        )
    }
Example #2
Source File: TablePaginationActions.tsx    From crossfeed with Creative Commons Zero v1.0 Universal 5 votes vote down vote up
TablePaginationActions = (props: Props) => {
  const { count, page, rowsPerPage, onChangePage } = props;
  const classes = useStyles();

  const handleFirstPageButtonClick = (
    event: React.MouseEvent<HTMLButtonElement>
  ) => {
    onChangePage(event, 0);
  };

  const handleBackButtonClick = (
    event: React.MouseEvent<HTMLButtonElement>
  ) => {
    onChangePage(event, page - 1);
  };

  const handleNextButtonClick = (
    event: React.MouseEvent<HTMLButtonElement>
  ) => {
    onChangePage(event, page + 1);
  };

  const handleLastPageButtonClick = (
    event: React.MouseEvent<HTMLButtonElement>
  ) => {
    onChangePage(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
  };

  return (
    <div className={classes.root}>
      <IconButton
        onClick={handleFirstPageButtonClick}
        disabled={page === 0}
        aria-label="first page"
      >
        <FirstPageIcon />
      </IconButton>
      <IconButton
        onClick={handleBackButtonClick}
        disabled={page === 0}
        aria-label="previous page"
      >
        <KeyboardArrowLeft />
      </IconButton>
      <IconButton
        onClick={handleNextButtonClick}
        disabled={page >= Math.ceil(count / rowsPerPage) - 1}
        aria-label="next page"
      >
        <KeyboardArrowRight />
      </IconButton>
      <IconButton
        onClick={handleLastPageButtonClick}
        disabled={page >= Math.ceil(count / rowsPerPage) - 1}
        aria-label="last page"
      >
        <LastPageIcon />
      </IconButton>
    </div>
  );
}