/* eslint no-unused-vars: 0 */ import React from 'react'; import BootstrapTable from 'react-bootstrap-table2'; import Code from 'components/common/code-block'; import { productsGenerator } from 'utils/common'; const products = productsGenerator(); const columns = [{ dataField: 'id', text: 'Product ID' }, { dataField: 'name', text: 'Product Name' }, { dataField: 'price', text: 'Product Price' }]; const selectRow1 = { mode: 'checkbox', clickToSelect: true, classes: 'selection-row' }; const selectRow2 = { mode: 'checkbox', clickToSelect: true, classes: (row, rowIndex) => (rowIndex > 1 ? 'row-index-bigger-than-2101' : 'row-index-small-than-2101') }; const sourceCode1 = `\ const columns = [{ dataField: 'id', text: 'Product ID' }, { dataField: 'name', text: 'Product Name' }, { dataField: 'price', text: 'Product Price' }]; const selectRow = { mode: 'checkbox', clickToSelect: true, classes: 'selection-row' }; `; const sourceCode2 = `\ const columns = [{ dataField: 'id', text: 'Product ID' }, { dataField: 'name', text: 'Product Name' }, { dataField: 'price', text: 'Product Price' }]; const selectRow = { mode: 'checkbox', clickToSelect: true, classes: (row, rowIndex) => (rowIndex > 1 ? 'row-index-bigger-than-2101' : 'row-index-small-than-2101') }; `; export default () => (
{ sourceCode1 } { sourceCode2 }
);