index.dev.js 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import React from 'react'
  2. import ReactDOM from 'react-dom'
  3. import PopinFixed from './component/PopinFixed/PopinFixed.jsx'
  4. import PopinFixedHeader from './component/PopinFixed/PopinFixedHeader.jsx'
  5. import PopinFixedOption from './component/PopinFixed/PopinFixedOption.jsx'
  6. import PopinFixedContent from './component/PopinFixed/PopinFixedContent.jsx'
  7. import TextAreaApp from './component/Input/TextAreaApp/TextAreaApp.jsx'
  8. import BtnSwitch from './component/Input/BtnSwitch/BtnSwitch.jsx'
  9. import Timeline from './component/Timeline/Timeline.jsx'
  10. import TimelineDebugData from './component/Timeline/debugData.js'
  11. import Delimiter from './component/Delimiter/Delimiter.jsx'
  12. import CardPopup from './component/CardPopup/CardPopup.jsx'
  13. import CardPopupCreateContent from './component/CardPopup/CardPopupCreateContent.jsx'
  14. import NewVersionButton from './component/OptionComponent/NewVersionBtn.jsx'
  15. import ArchiveDeleteContent from './component/OptionComponent/ArchiveDeleteContent.jsx'
  16. ReactDOM.render(
  17. <div style={{width: '1200px'}}>
  18. <PopinFixed customClass={`${'randomClass'}`}>
  19. <PopinFixedHeader
  20. customClass={`${'randomClass'}`}
  21. faIcon={'fa fa-file-word-o'}
  22. name={'test exemple'}
  23. onClickCloseBtn={() => {}}
  24. />
  25. <PopinFixedOption
  26. customClass={`${'randomClass'}`}
  27. onClickNewVersionBtn={() => {}}
  28. selectedStatus={{
  29. label: 'Open',
  30. slug: 'open',
  31. faIcon: 'square-o',
  32. hexcolor: '#3f52e3',
  33. globalStatus: 'open'
  34. }}
  35. availableStatus={[{
  36. label: 'Open',
  37. slug: 'open',
  38. faIcon: 'square-o',
  39. hexcolor: '#3f52e3',
  40. globalStatus: 'open'
  41. }, {
  42. label: 'Validated',
  43. slug: 'closed-validated',
  44. faIcon: 'check-square-o',
  45. hexcolor: '#008000',
  46. globalStatus: 'closed'
  47. }, {
  48. label: 'Cancelled',
  49. slug: 'closed-unvalidated',
  50. faIcon: 'close',
  51. hexcolor: '#f63434',
  52. globalStatus: 'closed'
  53. }, {
  54. label: 'Deprecated',
  55. slug: 'closed-deprecated',
  56. faIcon: 'warning',
  57. hexcolor: '#ababab',
  58. globalStatus: 'closed'
  59. }]}
  60. onChangeStatus={newStatus => console.log('newStatus', newStatus)}
  61. onClickArchive={() => console.log('btn archive clicked')}
  62. onClickDelete={() => console.log('btn delete clicked')}
  63. />
  64. <PopinFixedContent customClass={`${'randomClass'}__contentpage`}>
  65. <div>
  66. <NewVersionButton customColor='#3f52e3' />
  67. <ArchiveDeleteContent customColor='#3f52e3' />
  68. <Delimiter />
  69. <span>Here will be the app content. Style is handled by the app (obviously)</span>
  70. <BtnSwitch />
  71. {/* <TextAreaApp customClass={'randomClass'} text={'woot'} /> */}
  72. </div>
  73. <Timeline
  74. customClass={`${'randomClass'}__contentpage`}
  75. customColor={'#3f52e3'}
  76. loggedUser={{
  77. user_id: 1,
  78. username: 'Smoi',
  79. firstname: 'Côme',
  80. lastname: 'Stoilenom',
  81. email: 'osef@algoo.fr',
  82. avatar_url: 'https://avatars3.githubusercontent.com/u/11177014?s=460&v=4'
  83. }}
  84. timelineData={TimelineDebugData}
  85. newComment={''}
  86. disableComment={false}
  87. wysiwyg={false}
  88. onChangeNewComment={() => {}}
  89. onClickValidateNewCommentBtn={() => {}}
  90. onClickWysiwygBtn={() => {}}
  91. onClickRevisionBtn={() => {}}
  92. shouldScrollToBottom={true}
  93. />
  94. </PopinFixedContent>
  95. </PopinFixed>
  96. </div>
  97. , document.getElementById('content')
  98. )