1.1.4 • Published 2 years ago

react-bootstrap-table-loading v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Bootstrap Table Loading

This component creates a placeholder of random size with specific number of rows and columns.

Install

npm install react-bootstrap-table-loading

Usage

Component usage example.

TableLoading

import 'bootstrap/dist/css/bootstrap.min.css';

import { Table } from 'react-bootstrap';
import { TableLoading } from 'react-bootstrap-table-loading';

export default () => {
  return <Table striped bordered>
    <thead>
      <tr>
        <th>First column</th>
        <th>Second column</th>
        <th>Third column</th>
      </tr>
    </thead>
    <TableLoading
      columns={4}
      lines={4}
    />
  </Table>
}

You can see a interative component in Storybook.

Props

TableLoading

NameTypeDefaultDescription
columnsColumn | number-Required. Array with Column object type values or numeric column number
linesnumber-Required. Number of lines
tbodybooleantrueRender with <tbody> element
tbodyPropsobject{}tbody properties

Types

Column

NameTypeDefaultDescription
minnumber-Required. Min col size
maxnumber-Required. Max col size

License

MIT