bootstrap-table-react

1.2.1 • Public • Published

npm version Build Status Dependency Status devDependency Status

bootstrap-table-react

A simple bootstrap table in react.

propTypes

A snippet is worth a thousand words.

const column = PropTypes.shape({
    key: PropTypes.string.isRequired,
    formattedKey: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),
    valueFormatter: PropTypes.func
});
 
const item = PropTypes.shape({
    id: PropTypes.string.isRequired
});
 
export default class Table {
 
    static propTypes = {
        className: PropTypes.string,
        collection: PropTypes.arrayOf(item).isRequired,
        columns: PropTypes.arrayOf(
            PropTypes.oneOfType([PropTypes.string, column])
        ).isRequired,
        onRowClick: PropTypes.func,
        tableOptions: PropTypes.shape({
            bordered: PropTypes.bool,
            condensed: PropTypes.bool,
            hover: PropTypes.bool,
            responsive: PropTypes.bool,
            striped: PropTypes.bool
        })
    }
 
    // ...
 
}

/bootstrap-table-react/

    Package Sidebar

    Install

    npm i bootstrap-table-react

    Weekly Downloads

    2

    Version

    1.2.1

    License

    MIT

    Last publish

    Collaborators

    • pscanf
    • staticdeploy-npm-bot
    • davidebianchi