@@ -3,9 +3,9 @@ import {storiesOf} from '@storybook/react'
33
44import Board from '../src'
55
6- const CustomLaneHeader = props => {
6+ const CustomLaneHeader = ( { label , cards , title , current , target } ) => {
77 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!` )
99 }
1010 return (
1111 < div >
@@ -18,15 +18,16 @@ const CustomLaneHeader = props => {
1818 flexDirection : 'row' ,
1919 justifyContent : 'space-between'
2020 } } >
21- < div style = { { fontSize : 14 , fontWeight : 'bold' } } > { props . title } </ div >
22- { props . label && (
21+ < div style = { { fontSize : 14 , fontWeight : 'bold' } } > { title } </ div >
22+ { label && (
2323 < div style = { { width : '30%' , textAlign : 'right' , fontSize : 13 } } >
2424 < button onClick = { buttonHandler } style = { { cursor : 'pointer' } } >
2525 ?
2626 </ button >
2727 </ div >
2828 ) }
2929 </ header >
30+ < div > Percentage: { current || 0 } /{ target } </ div >
3031 </ div >
3132 )
3233}
@@ -39,6 +40,8 @@ storiesOf('Custom Components', module).add(
3940 {
4041 id : 'lane1' ,
4142 title : 'Planned Tasks' ,
43+ current : "70" , // custom property
44+ target : "100" , // custom property
4245 label : 'First Lane here' ,
4346 cards : [
4447 {
@@ -57,6 +60,8 @@ storiesOf('Custom Components', module).add(
5760 id : 'lane2' ,
5861 title : 'Completed Tasks' ,
5962 label : 'Second Lane here' ,
63+ current : "30" , // custom property
64+ target : "100" , // custom property
6065 cards : [
6166 {
6267 id : 'Card3' ,
0 commit comments