Add sample step components for the remaining steps with accompaning text
- rename step subfolders from <name>step to <name>
This commit is contained in:
parent
06e33d7ac6
commit
473cc9ca6e
14 changed files with 155 additions and 15 deletions
12
frontend/src/components/steps/habitat/HabitatSelector.js
Normal file
12
frontend/src/components/steps/habitat/HabitatSelector.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { useEffect } from 'react';
|
||||
|
||||
export default function HabitatSelector(props) {
|
||||
|
||||
useEffect(() => {
|
||||
props.setNextDisabled(false);
|
||||
});
|
||||
|
||||
return (
|
||||
<h2>Habitat Selector</h2>
|
||||
)
|
||||
}
|
21
frontend/src/components/steps/habitat/HabitatStep.js
Normal file
21
frontend/src/components/steps/habitat/HabitatStep.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import Step from '../Step';
|
||||
import HabitatSelector from './HabitatSelector'
|
||||
import StepInformation from '../StepInformation';
|
||||
import staticText from '../../../assets/data/staticText.json'
|
||||
|
||||
export default function HabitatStep(props) {
|
||||
const habitatInfoPanel = (
|
||||
<StepInformation
|
||||
title={staticText.steps.habitat.title}
|
||||
description={<p>{staticText.steps.habitat.description}</p>}
|
||||
/>
|
||||
)
|
||||
|
||||
const habitatSelectionPanel = (
|
||||
<HabitatSelector {...props} />
|
||||
)
|
||||
|
||||
return (
|
||||
<Step informationComponent={habitatInfoPanel} selectionComponent={habitatSelectionPanel} />
|
||||
)
|
||||
}
|
|
@ -12,7 +12,7 @@ export default function SoilVariantStep(props) {
|
|||
|
||||
const soilVarientInfoPanel = (
|
||||
<StepInformation
|
||||
title={staticText.steps.location.title}
|
||||
title={staticText.steps.soil.title}
|
||||
description={SOIL_DESCRIPTION}
|
||||
/>
|
||||
)
|
|
@ -0,0 +1,12 @@
|
|||
import { useEffect } from 'react';
|
||||
|
||||
export default function ProjectSpecificsSelector(props) {
|
||||
|
||||
useEffect(() => {
|
||||
props.setNextDisabled(false);
|
||||
});
|
||||
|
||||
return (
|
||||
<h2>Project Specifics Selector</h2>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
import Step from '../Step';
|
||||
import ProjectSpecificsSelector from './ProjectSpecificsSelector'
|
||||
import StepInformation from '../StepInformation';
|
||||
import staticText from '../../../assets/data/staticText.json'
|
||||
|
||||
export default function ProjectSpecificsStep(props) {
|
||||
const projectSpecificsInfoPanel = (
|
||||
<StepInformation
|
||||
title={staticText.steps.projectSpecifics.title}
|
||||
description={<p>{staticText.steps.projectSpecifics.description}</p>}
|
||||
/>
|
||||
)
|
||||
|
||||
const projectSpecificsSelectionPanel = (
|
||||
<ProjectSpecificsSelector {...props} />
|
||||
)
|
||||
|
||||
return (
|
||||
<Step informationComponent={projectSpecificsInfoPanel} selectionComponent={projectSpecificsSelectionPanel} />
|
||||
)
|
||||
}
|
12
frontend/src/components/steps/summary/SummaryContent.js
Normal file
12
frontend/src/components/steps/summary/SummaryContent.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { useEffect } from 'react';
|
||||
|
||||
export default function SummaryContent(props) {
|
||||
|
||||
useEffect(() => {
|
||||
props.setNextDisabled(false);
|
||||
});
|
||||
|
||||
return (
|
||||
<h2>Summary Content</h2>
|
||||
)
|
||||
}
|
21
frontend/src/components/steps/summary/ZoneStep.js
Normal file
21
frontend/src/components/steps/summary/ZoneStep.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import Step from '../Step';
|
||||
import SummaryContent from './SummaryContent'
|
||||
import StepInformation from '../StepInformation';
|
||||
import staticText from '../../../assets/data/staticText.json'
|
||||
|
||||
export default function SummaryStep(props) {
|
||||
const summaryInfoPanel = (
|
||||
<StepInformation
|
||||
title={staticText.steps.summary.title}
|
||||
description={<p>{staticText.steps.summary.description}</p>}
|
||||
/>
|
||||
)
|
||||
|
||||
const summaryContent = (
|
||||
<SummaryContent {...props} />
|
||||
)
|
||||
|
||||
return (
|
||||
<Step informationComponent={summaryInfoPanel} selectionComponent={summaryContent} />
|
||||
)
|
||||
}
|
12
frontend/src/components/steps/zone/ZoneSelector.js
Normal file
12
frontend/src/components/steps/zone/ZoneSelector.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { useEffect } from 'react';
|
||||
|
||||
export default function ZoneSelector(props) {
|
||||
|
||||
useEffect(() => {
|
||||
props.setNextDisabled(false);
|
||||
});
|
||||
|
||||
return (
|
||||
<h2>Zone Selector</h2>
|
||||
)
|
||||
}
|
21
frontend/src/components/steps/zone/ZoneStep.js
Normal file
21
frontend/src/components/steps/zone/ZoneStep.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import Step from '../Step';
|
||||
import ZoneSelector from './ZoneSelector'
|
||||
import StepInformation from '../StepInformation';
|
||||
import staticText from '../../../assets/data/staticText.json'
|
||||
|
||||
export default function ZoneStep(props) {
|
||||
const zoneInfoPanel = (
|
||||
<StepInformation
|
||||
title={staticText.steps.zone.title}
|
||||
description={<p>{staticText.steps.zone.description}</p>}
|
||||
/>
|
||||
)
|
||||
|
||||
const zoneSelectionPanel = (
|
||||
<ZoneSelector {...props} />
|
||||
)
|
||||
|
||||
return (
|
||||
<Step informationComponent={zoneInfoPanel} selectionComponent={zoneSelectionPanel} />
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue