项目作者: sorahn

项目描述 :
Instant sticky header. Just add water.
高级语言: JavaScript
项目地址: git://github.com/sorahn/sticky-head.git
创建时间: 2017-10-11T05:53:58Z
项目社区:https://github.com/sorahn/sticky-head

开源协议:

下载


sticky-head

TODO: Component Description

Usage

Simply replace the <thead> in any table with <StickyHead>

  1. // Import Component
  2. import { StickyHead } from "sticky-head"
  3. const App = () => {
  4. return (
  5. <table>
  6. <StickyHead>
  7. <tr>
  8. <th>Header 1</th>
  9. <th>Header 2</th>
  10. </tr>
  11. </StickyHead>
  12. <tbody>
  13. <tr>
  14. <td>Cell 1</td>
  15. <td>Cell 2</td>
  16. </tr>
  17. </tbody>
  18. </table>
  19. )
  20. }

See it in action

This repo contains some demos that you can run to see it in action. To get started using the demos run the following commands.

  1. $ git clone https://github.com/sorahn/sticky-head.git
  2. $ cd sticky-head
  3. $ yarn start