forked from rcdexta/react-trello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Styling.story.js
106 lines (98 loc) · 2.6 KB
/
Styling.story.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import React from 'react'
import {storiesOf} from '@storybook/react'
import Board from '../src'
import './board.css'
const data = require('./data/base.json')
storiesOf('Styling', module).add(
'Board Styling',
() => <Board data={data} style={{padding: '30px 20px', fontFamily: 'Verdana'}} className="boardContainer" />,
{info: 'Change the background and other css styles for the board container'}
)
const dataWithLaneStyles = {
lanes: [
{
id: 'PLANNED',
title: 'Planned Tasks',
label: '20/70',
style: {width: 280, backgroundColor: '#3179ba', color: '#fff', boxShadow: '2px 2px 4px 0px rgba(0,0,0,0.75)'},
cards: [
{
id: 'Milk',
title: 'Buy milk',
label: '15 mins',
description: '2 Gallons of milk at the Deli store',
},
{
id: 'Plan2',
title: 'Dispose Garbage',
label: '10 mins',
description: 'Sort out recyclable and waste as needed'
}
]
},
{
id: 'DONE',
title: 'Doned tasks',
label: '10/70',
style: {width: 280, backgroundColor: '#ba7931', color: '#fff', boxShadow: '2px 2px 4px 0px rgba(0,0,0,0.75)'},
cards: [
{
id: 'burn',
title: 'Burn Garbage',
label: '10 mins',
description: 'Sort out recyclable and waste as needed'
},
]
},
{
id: 'ARCHIVE',
title: 'Archived tasks',
label: '1/2',
cards: [
{
id: 'archived',
title: 'Archived',
label: '10 mins',
},
]
}
]
}
storiesOf('Styling', module)
.add('Lane Styling',
() => <Board data={dataWithLaneStyles} laneStyle={{backgroundColor: '#666'}} style={{backgroundColor: '#eee'}} />,
{
info: 'Change the look and feel of the lane'
})
const dataWithCardStyles = {
lanes: [
{
id: 'PLANNED',
title: 'Planned Tasks',
label: '20/70',
cards: [
{
id: 'Milk',
title: 'Buy milk',
label: '15 mins',
description: '2 Gallons of milk at the Deli store',
style: { backgroundColor: '#eec' },
},
{
id: 'Plan2',
title: 'Dispose Garbage',
label: '10 mins',
description: 'Sort out recyclable and waste as needed'
},
{
id: 'Plan3',
title: 'Burn Garbage',
label: '20 mins'
}
]
}
]
}
storiesOf('Styling', module).add('Card Styling', () => <Board data={dataWithCardStyles} cardStyle={{backgroundColor: '#ffe'}} />, {
info: 'Change the background of cards'
})