@@ -3,9 +3,9 @@ import {storiesOf} from '@storybook/react'
3
3
4
4
import Board from '../src'
5
5
6
- const CustomLaneHeader = props => {
6
+ const CustomLaneHeader = ( { label , cards , title , current , target } ) => {
7
7
const buttonHandler = ( ) => {
8
- alert ( `The label passed to the lane was: ${ props . label } . The lane has ${ props . cards . length } cards!` )
8
+ alert ( `The label passed to the lane was: ${ label } . The lane has ${ cards . length } cards!` )
9
9
}
10
10
return (
11
11
< div >
@@ -18,15 +18,16 @@ const CustomLaneHeader = props => {
18
18
flexDirection : 'row' ,
19
19
justifyContent : 'space-between'
20
20
} } >
21
- < div style = { { fontSize : 14 , fontWeight : 'bold' } } > { props . title } </ div >
22
- { props . label && (
21
+ < div style = { { fontSize : 14 , fontWeight : 'bold' } } > { title } </ div >
22
+ { label && (
23
23
< div style = { { width : '30%' , textAlign : 'right' , fontSize : 13 } } >
24
24
< button onClick = { buttonHandler } style = { { cursor : 'pointer' } } >
25
25
?
26
26
</ button >
27
27
</ div >
28
28
) }
29
29
</ header >
30
+ < div > Percentage: { current || 0 } /{ target } </ div >
30
31
</ div >
31
32
)
32
33
}
@@ -39,6 +40,8 @@ storiesOf('Custom Components', module).add(
39
40
{
40
41
id : 'lane1' ,
41
42
title : 'Planned Tasks' ,
43
+ current : "70" , // custom property
44
+ target : "100" , // custom property
42
45
label : 'First Lane here' ,
43
46
cards : [
44
47
{
@@ -57,6 +60,8 @@ storiesOf('Custom Components', module).add(
57
60
id : 'lane2' ,
58
61
title : 'Completed Tasks' ,
59
62
label : 'Second Lane here' ,
63
+ current : "30" , // custom property
64
+ target : "100" , // custom property
60
65
cards : [
61
66
{
62
67
id : 'Card3' ,
0 commit comments