-
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.
Merge branch 'prakashbalaji-lane_sort'
- Loading branch information
Showing
6 changed files
with
111 additions
and
6 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
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,18 @@ | ||
import React from 'react'; | ||
import {storiesOf} from '@kadira/storybook'; | ||
|
||
import {Board, Lane, Card} from '../components'; | ||
|
||
const lane = require('./data-sort.json'); | ||
|
||
storiesOf('react-trello', module) | ||
|
||
.addWithInfo('Event Handling Through Lane', | ||
'Adding event handlers to each card through lane card click method', | ||
() => ( | ||
<Board> | ||
<Lane id={lane.key} title={lane.description} cards={lane.cards} onCardClick={(m) => alert(JSON.stringify(m))}> | ||
</Lane> | ||
</Board> | ||
)) | ||
|
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,26 @@ | ||
import React from 'react'; | ||
import {storiesOf} from '@kadira/storybook'; | ||
|
||
import {Board, Lane, Card} from '../components'; | ||
|
||
const lane = require('./data-sort.json'); | ||
|
||
storiesOf('react-trello', module) | ||
|
||
.addWithInfo('Sorted Lane', | ||
'A lane sorted by completed at ascending', | ||
() => ( | ||
<Board> | ||
<Lane id={lane.key} title={lane.description} cards={lane.cards} sortFunction={(o1,o2) => new Date(o1.completedAt) - new Date(o2.completedAt)}> | ||
</Lane> | ||
</Board> | ||
)) | ||
|
||
.addWithInfo('Reverse Sorted Lane', | ||
'A lane sorted by completed at descending', | ||
() => ( | ||
<Board> | ||
<Lane id={lane.key} title={lane.description} cards={lane.cards} sortFunction={(o1,o2) => new Date(o2.completedAt) - new Date(o1.completedAt)}> | ||
</Lane> | ||
</Board> | ||
)); |
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,44 @@ | ||
{ | ||
"key": "SORTED_LANE", | ||
"description": "Sorted Lane", | ||
"overdueCount": 20, | ||
"totalCount": 70, | ||
"cards": [ | ||
{ | ||
"title": "Buy milk", | ||
"sla": "15 mins", | ||
"description": "2 Gallons of milk at the Deli store - 2017-12-01", | ||
"metadata":{ | ||
"completedAt":"2017-12-01T10:00:00Z", | ||
"shortCode": "abc" | ||
} | ||
}, | ||
{ | ||
"title": "Dispose Garbage", | ||
"sla": "10 mins", | ||
"description": "Sort out recyclable and waste as needed - 2017-11-01", | ||
"metadata":{ | ||
"completedAt":"2017-11-01T10:00:00Z", | ||
"shortCode": "aaa" | ||
} | ||
}, | ||
{ | ||
"title": "Write Blog", | ||
"sla": "30 mins", | ||
"description": "Can AI make memes? - 2017-10-01", | ||
"metadata":{ | ||
"completedAt":"2017-10-01T10:00:00Z", | ||
"shortCode": "fa1" | ||
} | ||
}, | ||
{ | ||
"title": "Pay Rent", | ||
"sla": "5 mins", | ||
"description": "Transfer to bank account - 2017-09-01", | ||
"metadata":{ | ||
"completedAt":"2017-09-01T10:00:00Z", | ||
"shortCode": "ga2" | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import './Base.story' | ||
import './Sort.story' | ||
import './Interactions.story' | ||
import './InteractionsFromLane.story.js' | ||
import './Pagination.story' |