Skip to content
Snippets Groups Projects
Commit ec5afe2d authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

style(forms): fix UI on edit/add user

parent e35324f1
No related branches found
No related tags found
1 merge request!13Sprint #14
...@@ -108,6 +108,9 @@ const Row = styled.div` ...@@ -108,6 +108,9 @@ const Row = styled.div`
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin: calc(${th('subGridUnit')}*3) 0; margin: calc(${th('subGridUnit')}*3) 0;
div[role='alert'] {
margin-top: 0;
}
` `
const RowItem = styled.div` const RowItem = styled.div`
......
...@@ -12,7 +12,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) => ...@@ -12,7 +12,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) =>
!isUndefined(initialValues) ? ( !isUndefined(initialValues) ? (
<FormContainer onSubmit={handleSubmit}> <FormContainer onSubmit={handleSubmit}>
<Row> <Row>
<RowItem vertical> <RowItem vertical withMargin>
<Label>First name*</Label> <Label>First name*</Label>
<ValidatedField <ValidatedField
component={TextField} component={TextField}
...@@ -20,7 +20,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) => ...@@ -20,7 +20,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) =>
validate={[required]} validate={[required]}
/> />
</RowItem> </RowItem>
<RowItem vertical> <RowItem vertical withMargin>
<Label>Last name*</Label> <Label>Last name*</Label>
<ValidatedField <ValidatedField
component={TextField} component={TextField}
...@@ -30,7 +30,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) => ...@@ -30,7 +30,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) =>
</RowItem> </RowItem>
</Row> </Row>
<Row> <Row>
<RowItem vertical> <RowItem vertical withMargin>
<Label>Affiliation*</Label> <Label>Affiliation*</Label>
<ValidatedField <ValidatedField
component={TextField} component={TextField}
...@@ -39,7 +39,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) => ...@@ -39,7 +39,7 @@ const Step0 = ({ journal, handleSubmit, initialValues, error }) =>
/> />
</RowItem> </RowItem>
<RowItem vertical> <RowItem vertical withMargin>
<Label>Title*</Label> <Label>Title*</Label>
<ValidatedField <ValidatedField
component={input => <Menu {...input} options={journal.title} />} component={input => <Menu {...input} options={journal.title} />}
......
...@@ -67,6 +67,8 @@ export const RowItem = styled.div` ...@@ -67,6 +67,8 @@ export const RowItem = styled.div`
& > div { & > div {
flex: 1; flex: 1;
} }
margin-right: ${({ withMargin }) =>
withMargin ? css`calc(${th('subGridUnit')} * 3)` : 0};
` `
export const Label = styled.div` export const Label = styled.div`
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment