File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed
src/GeographicalFeatures/CriticalFacilities Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2+ import { PageHeader } from 'antd' ;
3+ import PropTypes from 'prop-types' ;
24
35/**
6+ * @param root0
7+ * @param root0.name
8+ * @param root0.description
9+ * @param root0.onBack
410 * @function
511 * @name CriticalFacilityDetailsViewHeader
612 * @description header details of a critical facility
713 * @returns {object } React component
814 * @version 0.1.0
915 * @since 0.1.0
1016 */
11- const CriticalFacilityDetailsViewHeader = ( ) => {
12- return < div > This is header</ div > ;
13- } ;
17+ const CriticalFacilityDetailsViewHeader = ( { name, description, onBack } ) => (
18+ < PageHeader
19+ title = { < span style = { { fontSize : '16px' , fontWeight : 500 } } > { name } </ span > }
20+ subTitle = { description }
21+ onBack = { ( ) => onBack ( ) }
22+ />
23+ ) ;
1424
1525export default CriticalFacilityDetailsViewHeader ;
26+ CriticalFacilityDetailsViewHeader . propTypes = {
27+ name : PropTypes . string . isRequired ,
28+ description : PropTypes . string . isRequired ,
29+ onBack : PropTypes . func . isRequired ,
30+ } ;
Original file line number Diff line number Diff line change @@ -637,10 +637,8 @@ class FeatureList extends Component {
637637 < Drawer
638638 title = {
639639 < CriticalFacilityDetailsViewHeader
640- number = { get ( feature , 'number' , 'N/A' ) }
641- description = { get ( feature , 'description' , 'N/A' ) }
642- type = { get ( feature , 'type.strings.name.en' , 'N/A' ) }
643- stage = { get ( feature , 'stage' , 'N/A' ) }
640+ name = { get ( feature , 'strings.name.en' , 'N/A' ) }
641+ description = { get ( feature , 'strings.description.en' , 'N/A' ) }
644642 onBack = { this . closeDetails }
645643 />
646644 }
You can’t perform that action at this time.
0 commit comments