index.tsx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // import * as React from 'react';
  2. // import { Dragact } from '../lib/dragact'
  3. // import './index.css'
  4. // const Words = [
  5. // { content: 'Sorry I just can not move in any circumstances', img: 'http://pic.sc.chinaz.com/files/pic/pic9/201303/xpic10472.jpg', static: true },
  6. // { content: 'Those who dare to fail miserably can achieve greatly.', img: 'https://img00.deviantart.net/1163/i/2013/059/d/7/irish_views_by_ssquared_photography-d5wjnsk.jpg' },
  7. // { content: 'You miss 100 percent of the shots you never take.', img: 'http://www.landsendhotel.co.uk/uploads/gallery/gallery/coastal_scenery_seascapes_6.jpg' },
  8. // { content: 'Sorry I just can not move in any circumstances,too', img: 'https://tctechcrunch2011.files.wordpress.com/2017/10/26099344353_18cd6fabb8_k.jpg?w=738', static: true },
  9. // { content: 'I’d rather live with a good question than a bad answer.', img: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQVa26cLzh6PYUwY4LMpwbHyDHFmWi_w2JuqDzeOdm1IIEbBZO0Vg' }
  10. // ]
  11. // const Cell = (props: any) => {
  12. // const { item } = props;
  13. // return (
  14. // <div className={`layout-Cell ${item.static ? "static" : ""}`} style={{ background: item.static ? "#e8e8e8" : "" }}>
  15. // <img src={item.img} style={{ width: 45, height: 45 }} draggable={false} alt='card'></img>
  16. // <div style={{ paddingLeft: 12, color: '#595959' }}>{item.content}</div>
  17. // </div>
  18. // )
  19. // }
  20. // export const SortedTableWithStatic = () => {
  21. // return (
  22. // <div style={{ display: 'flex', justifyContent: 'center' }}>
  23. // <div>
  24. // <h1 style={{ textAlign: 'center' }}>Static Header Table Demo</h1>
  25. // <Dragact width={800} col={1} rowHeight={60} margin={[2, 2]} className='normal-layout'>
  26. // {Words.map((el, index) => {
  27. // return <Cell item={el} key={index} data-set={{ GridX: 0, GridY: index, w: 1, h: 1, static: el.static }} />
  28. // })}
  29. // </Dragact>
  30. // </div>
  31. // </div>
  32. // )
  33. // }