This repository has been archived by the owner on Oct 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added initial page components (#2306)
* added initial page components * add styling to the pages * add empty function for onClick
- Loading branch information
1 parent
03f4f04
commit 7dbf988
Showing
1 changed file
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,56 @@ | ||
import React from 'react' | ||
import React, { useState } from 'react' | ||
import { | ||
FormH2, | ||
Paragraph, | ||
} from '@elifesciences/component-elife-ui/client/atoms' | ||
import { Button, TextField } from '@pubsweet/ui' | ||
import { Box } from '@rebass/grid' | ||
|
||
const SurveyPage = () => <div>Hello Im a Survey :D</div> | ||
const SurveyPage = () => { | ||
const [country, setCountry] = useState('') | ||
const [gender, setGender] = useState('') | ||
const [timeAsPI, setTimeAsPI] = useState('') | ||
return ( | ||
<Box mx="25%" width={1 / 2}> | ||
<FormH2>Help us reduce bias</FormH2> | ||
<Paragraph.Writing> | ||
Answering the following questions about the last author of your | ||
submission (i.e. group leader or principal investigator) will help our | ||
efforets to reduce bias in our submission and peer review process. | ||
</Paragraph.Writing> | ||
<Paragraph.Writing> | ||
Your answers will <u>not</u> be shared with the Editors handling the | ||
papaer and will be anonymised when we analyse the data we collect. | ||
</Paragraph.Writing> | ||
<Box mb={3}> | ||
<TextField | ||
label="Country of residence of Last Author:" | ||
onChange={e => setCountry(e.target.value)} | ||
placeholder="Enter text here" | ||
value={country} | ||
/> | ||
</Box> | ||
<Box mb={3}> | ||
<TextField | ||
label="Gender of Last Author:" | ||
onChange={e => setGender(e.target.value)} | ||
placeholder="Enter text here" | ||
value={gender} | ||
/> | ||
</Box> | ||
<Box mb={4}> | ||
<TextField | ||
label="When did the Last Author become an independent researcher?" | ||
onChange={e => setTimeAsPI(e.target.value)} | ||
placeholder="Enter text here" | ||
value={timeAsPI} | ||
/> | ||
</Box> | ||
<Button data-test-id="submit" onClick={() => {}} primary type="button"> | ||
{country === '' && gender === '' && timeAsPI === '' ? 'Skip' : 'Done'} | ||
</Button> | ||
</Box> | ||
) | ||
} | ||
|
||
export default SurveyPage |