Skip to content
This repository has been archived by the owner on Jun 17, 2018. It is now read-only.

staticdeploy-archive/bootstrap-table-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
        })
    }

    // ...

}