Pagination.js 476 Bytes
Newer Older
1
import React from 'react';
Kim, Subin's avatar
Kim, Subin committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Pagination } from 'react-bootstrap';

function pagination() {
    let active = 1;
    let items = [];
    for (let number = 1; number <= 5; number++) {
        items.push(
            <Pagination.Item key={number} active={number === active}>
                {number}
            </Pagination.Item>,
        );
    }

    return (
Kim, Subin's avatar
Kim, Subin committed
16
        <Pagination className="justify-content-center">{items}</Pagination>
Kim, Subin's avatar
Kim, Subin committed
17
18
19
20
    )
}

export default pagination