UNPKG

3.52 kBTypeScriptView Raw
1import { storiesOf } from '@storybook/react';
2import * as React from 'react';
3import { WorkspaceActionCard } from '../components/WorkspaceActionCard';
4import { message } from '../';
5const cards = [
6 {
7 title: 'Discover a Challenge',
8 desc: 'Submit your problem description and solution proposal here',
9 closed: false,
10 shortDesc: 'Something here goes here ... ',
11 descHTML:
12 'FULL TEXT HELLO WORLD, and stuff and what not. FULL TEXT HELLO WORLD, and stuff and what not. FULL TEXT HELLO WORLD, and stuff and what not. FULL TEXT HELLO WORLD, and stuff and what not',
13 active: true,
14 buttonHandleClick: () => {
15 message.success('Action clicked');
16 }
17 },
18 {
19 title: 'Register your Team',
20 desc: 'Learn about the challenges surrounding San Diego',
21 closed: false,
22 dueDate: new Date('01/25/2020, 11:59:00 PM'),
23 startDate: new Date('12/16/2019, 11:59:00 PM'),
24 submitState: 'submitted',
25 buttonTitle: 'SEARCH FOR TEAMMATES',
26 active: true,
27 buttonHandleClick: () => {
28 message.success('HELLO');
29 }
30 },
31 {
32 title: 'Submit a Preliminary Concept',
33 desc: 'Submit your problem description and solution proposal here',
34 shortDesc: 'Something here goes here ... ',
35 active: false,
36 closed: false,
37 dueDate: new Date('02/03/2020, 11:59:00 PM'),
38 startDate: new Date('12/01/2019, 11:59:00 PM'),
39 submitState: 'saved',
40 buttonTitle: 'SOMETHING'
41 },
42 {
43 title: 'Request and Provide Feedback',
44 desc: 'Feedback will be available once you’ve made a submission',
45 closed: false,
46 dueDate: new Date('02/02/2020, 11:59:00 PM'),
47 startDate: new Date('12/16/2019, 11:59:00 PM'),
48 submitState: 'none',
49 feedbacklink: 'https://www.bing.com'
50 },
51 {
52 title: 'Request and Provide Feedback 2',
53 desc: 'Feedback will be available once you’ve made a submission',
54 closed: false,
55 dueDate: new Date('02/02/2020, 11:59:00 PM'),
56 startDate: new Date('12/16/2019, 11:59:00 PM'),
57 submitState: 'waitForFeedback',
58 feedbacklink: 'https://www.bing.com'
59 },
60 {
61 title: 'Request and Provide Feedback 3',
62 desc: 'Feedback will be available once you’ve made a submission',
63 closed: false,
64 dueDate: new Date('02/02/2020, 11:59:00 PM'),
65 startDate: new Date('12/16/2019, 11:59:00 PM'),
66 submitState: 'feedback',
67 feedback: 3,
68 feedbacklink: 'https://www.bing.com'
69 },
70 {
71 title: 'Request and Provide Feedback 4',
72 desc: 'Feedback will be available once you’ve made a submission',
73 closed: false,
74 dueDate: new Date('02/02/2020, 11:59:00 PM'),
75 startDate: new Date('12/16/2019, 11:59:00 PM'),
76 submitState: 'feedback',
77 feedback: 0,
78 feedbacklink: 'https://www.bing.com'
79 },
80 {
81 title: 'Submit Your Team’s Final Concept',
82 desc: 'Final submission will be available once you’ve made a submission',
83 closed: true,
84 dueDate: new Date('12/24/2019, 11:59:00 PM'),
85 submitted: false
86 },
87 {
88 title: 'View Community Voting Results',
89 desc: 'Judging will be available at the end of the competition',
90 closed: true,
91 dueDate: new Date('01/24/2020, 11:59:00 PM'),
92 submitted: false
93 }
94];
95storiesOf('Workspace Action Cards', module).add('Examples', () => (
96 <div className="storycontainer">
97 <div className="story-module" style={{ marginTop: '50px' }}>
98 {cards.map(card => {
99 return (
100 <div>
101 <WorkspaceActionCard card={card} />
102 </div>
103 );
104 })}
105 </div>
106 </div>
107));