@@ -5,7 +5,11 @@ import ButtonGroup from '@essappstate/canopy-react-buttongroup'
55
66const FeatureList = ( props ) => {
77 if ( props . list === undefined || props . list === null ) {
8- return < div > No features found. < a href = "./stories/Feature#" onClick = { props . add } > Add a feature set to get started.</ a > </ div >
8+ return (
9+ < div > No features found.
10+ < button className = "btn btn-link" onClick = { props . add } > Add a feature set to get started.</ button >
11+ </ div >
12+ )
913 }
1014
1115 const formatTopBottom = props . srcHttp + 'mod/stories/img/top-bottom.png'
@@ -20,12 +24,12 @@ const FeatureList = (props) => {
2024 {
2125 value : '1' ,
2226 label : 'Yes' ,
23- color : 'success'
27+ color : 'success'
2428 } , {
2529 value : '0' ,
2630 label : 'No' ,
27- color : 'danger'
28- } ,
31+ color : 'danger'
32+ }
2933 ]
3034
3135 let rows = props . list . map ( function ( value , key ) {
@@ -46,10 +50,20 @@ const FeatureList = (props) => {
4650 < td >
4751 < button
4852 className = "btn btn-primary btn-sm"
49- onClick = { props . loadCurrentFeature . bind ( null , key ) } > < i className = "fa fa-edit" > </ i > </ button >
50- < button className = "btn btn-danger btn-sm" onClick = { props . deleteFeature . bind ( null , key ) } > < i className = "far fa-trash-alt" > </ i > </ button >
53+ onClick = { props . loadCurrentFeature . bind ( null , key ) } >
54+ < i className = "fa fa-edit" > </ i >
55+ </ button >
56+ < button
57+ className = "btn btn-danger btn-sm"
58+ onClick = { props . deleteFeature . bind ( null , key ) } >
59+ < i className = "far fa-trash-alt" > </ i >
60+ </ button >
5161 </ td >
52- < td > { value . title ? value . title : < em className = "text-muted" > Untitled</ em > } </ td >
62+ < td > {
63+ value . title
64+ ? value . title
65+ : < em className = "text-muted" > Untitled</ em >
66+ } </ td >
5367 < td > { value . storyCount } </ td >
5468 < td > < img style = { iconStyle } src = { formatIcon } /> </ td >
5569 < td > < ButtonGroup
@@ -83,7 +97,7 @@ FeatureList.propTypes = {
8397 updateActive : PropTypes . func ,
8498 deleteFeature : PropTypes . func ,
8599 srcHttp : PropTypes . string ,
86- add : PropTypes . func ,
100+ add : PropTypes . func
87101}
88102
89103FeatureList . defaultTypes = { }
0 commit comments