-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow creating multiple boards
Each board gets its own redux store for isolation and performance reasons #65
- Loading branch information
Showing
4 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react' | ||
import {withInfo} from '@storybook/addon-info' | ||
import {storiesOf} from '@storybook/react' | ||
|
||
import Board from '../src' | ||
|
||
const data1 = require('./data/base.json') | ||
const data2 = require('./data/other-board') | ||
|
||
const containerStyles = { | ||
height: 500, | ||
padding: 20 | ||
} | ||
|
||
storiesOf('Multiple Boards', module).add( | ||
'Two Boards', | ||
withInfo('Have two boards rendering their own data')(() => { | ||
return ( | ||
<div style={{display: 'flex', flexDirection: 'column'}}> | ||
<div style={containerStyles}> | ||
<Board data={data1} /> | ||
</div> | ||
<div style={containerStyles}> | ||
<Board data={data2} /> | ||
</div> | ||
</div> | ||
) | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"lanes": [ | ||
{ | ||
"id": "yesterday", | ||
"title": "Yesterday", | ||
"label": "20/70", | ||
"cards": [ | ||
{ | ||
"id": "Wip1", | ||
"title": "Clean House", | ||
"label": "30 mins", | ||
"description": "Soap wash and polish floor. Polish windows and doors. Scrap all broken glasses" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "today", | ||
"title": "Today", | ||
"label": "10/20", | ||
"droppable": false, | ||
"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": "Plan3", | ||
"title": "Write Blog", | ||
"label": "30 mins", | ||
"description": "Can AI make memes?" | ||
}, | ||
{ | ||
"id": "Plan4", | ||
"title": "Pay Rent", | ||
"label": "5 mins", | ||
"description": "Transfer to bank account" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "tomorrow", | ||
"title": "Tomorrow", | ||
"label": "0/0", | ||
"cards": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters