colouring-montreal/app/src/frontend/building/data-containers/team.tsx
2022-06-01 10:51:24 +01:00

32 lines
1.0 KiB
TypeScript

import React, { Fragment } from 'react';
import InfoBox from '../../components/info-box';
import { dataFields } from '../../config/data-fields-config';
import SelectDataEntry from '../data-components/select-data-entry';
import withCopyEdit from '../data-container';
import { CategoryViewProps } from './category-view-props';
/**
* Team view/edit section
*/
const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => (
<Fragment>
<InfoBox msg="Can you help us capture information on who built the current building?"></InfoBox>
<SelectDataEntry
title={dataFields.is_extension.title}
slug="is_extension"
value={props.building.is_extension}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.is_extension.tooltip}
placeholder={dataFields.is_extension.example}
options={dataFields.is_extension.items}
/>
</Fragment>
);
const TeamContainer = withCopyEdit(TeamView);
export default TeamContainer;