|
| 1 | +/* eslint max-len: 0 */ |
| 2 | +import React from 'react'; |
| 3 | +import SimpleNavTable from './simple-nav-table'; |
| 4 | +import PaginationNavTable from './pagination-nav-table'; |
| 5 | +import NavWithSelectionTable from './nav-with-select-table'; |
| 6 | +import CustomNavStyleTable from './custom-style-nav-table'; |
| 7 | +import DisableClickToNavTable from './disable-click-to-nav-table'; |
| 8 | +import NavWithCellEditTable from './nav-with-cell-edit-table'; |
| 9 | +import CustomStyleNavWithCellEditTable from './custom-style-nav-with-cell-edit-table'; |
| 10 | +import EnterToEditWithNavTable from './enter-to-edit-with-nav-table'; |
| 11 | +import NavWithExpandingTable from './nav-with-expand-table'; |
| 12 | + |
| 13 | +import renderLinks from '../utils'; |
| 14 | + |
| 15 | +import { Col, Panel } from 'react-bootstrap'; |
| 16 | + |
| 17 | +class Demo extends React.Component { |
| 18 | + render() { |
| 19 | + return ( |
| 20 | + <Col md={ 8 } mdOffset={ 1 }> |
| 21 | + <Panel header={ 'A Simple Keyboard Navigation Table' }> |
| 22 | + { renderLinks('keyboard-nav/simple-nav-table.js') } |
| 23 | + <span> |
| 24 | + Default navigation is click on cell and keyborad tab or navigation(left/right/up/down) |
| 25 | + </span> |
| 26 | + <SimpleNavTable/> |
| 27 | + </Panel> |
| 28 | + <Panel header={ 'Keyboard Navigation with Pagintaion Table' }> |
| 29 | + { renderLinks('keyboard-nav/pagination-nav-table.js') } |
| 30 | + <PaginationNavTable/> |
| 31 | + </Panel> |
| 32 | + <Panel header={ 'Selection with Keyboard Navigation Example' }> |
| 33 | + { renderLinks('keyboard-nav/nav-with-select-table.js') } |
| 34 | + <NavWithSelectionTable/> |
| 35 | + </Panel> |
| 36 | + <Panel header={ 'Custom Style Example' }> |
| 37 | + { renderLinks('keyboard-nav/custom-style-nav-table.js') } |
| 38 | + <span> |
| 39 | + <code>keyBoardNav</code> accept a bool or object value<br/> |
| 40 | + Use <code>keyBoardNav.customStyle</code> to custom the styling on navigating cell<br/> |
| 41 | + </span> |
| 42 | + <CustomNavStyleTable/> |
| 43 | + </Panel> |
| 44 | + <Panel header={ 'Disable Click to Nav Example' }> |
| 45 | + { renderLinks('keyboard-nav/disable-click-to-nav-table.js') } |
| 46 | + <span> |
| 47 | + <code>keyBoardNav</code> accept a bool or object value<br/> |
| 48 | + Use <code>keyBoardNav.clickToNav</code> to disable the navigation on clicking cell<br/> |
| 49 | + If you disable it, you can still navigate with tab and left/right/up/down |
| 50 | + </span> |
| 51 | + <DisableClickToNavTable /> |
| 52 | + </Panel> |
| 53 | + <Panel header={ 'Cell Editing with Keyboard Navigation Example' }> |
| 54 | + { renderLinks('keyboard-nav/nav-with-cell-edit-table.js') } |
| 55 | + <NavWithCellEditTable/> |
| 56 | + </Panel> |
| 57 | + <Panel header={ 'Custom Style on Editing Cell with Navigating Example' }> |
| 58 | + { renderLinks('keyboard-nav/custom-style-nav-with-cell-edit-table') } |
| 59 | + <span> |
| 60 | + <code>keyBoardNav</code> accept a bool or object value<br/> |
| 61 | + Use <code>keyBoardNav.customStyleOnEditCell</code> to custom the styling on navigating and editing cell<br/> |
| 62 | + </span> |
| 63 | + <CustomStyleNavWithCellEditTable /> |
| 64 | + </Panel> |
| 65 | + <Panel header={ 'Enter to edit cell with Keyboard Navigation Example' }> |
| 66 | + { renderLinks('keyboard-nav/enter-to-edit-with-nav-table') } |
| 67 | + <span> |
| 68 | + <code>keyBoardNav</code> accept a bool or object value<br/> |
| 69 | + Use <code>keyBoardNav.enterToEdit</code> to trigger the navigating cell as editing<br/> |
| 70 | + </span> |
| 71 | + <EnterToEditWithNavTable /> |
| 72 | + </Panel> |
| 73 | + <Panel header={ 'Expand with Keyboard Navigation Example' }> |
| 74 | + { renderLinks('keyboard-nav/nav-with-expand-table.js') } |
| 75 | + <NavWithExpandingTable/> |
| 76 | + </Panel> |
| 77 | + </Col> |
| 78 | + ); |
| 79 | + } |
| 80 | +} |
| 81 | + |
| 82 | +export default Demo; |
0 commit comments