add connection modal

This commit is contained in:
Jan Prochazka
2020-01-01 11:23:30 +01:00
parent 0dba0d3a68
commit 7b7aaa8e0f
9 changed files with 214 additions and 4 deletions

35
web/src/utility/forms.js Normal file
View File

@@ -0,0 +1,35 @@
import React from 'react';
import styled from 'styled-components';
import { TextField } from './inputs';
import { Field } from 'formik';
export const FormRow = styled.div`
display: flex;
margin: 10px;
`;
export const FormLabel = styled.div`
width: 10vw;
font-weight: bold;
`;
export const FormValue = styled.div``;
export function FormTextField({ label, ...other }) {
return (
<FormRow>
<FormLabel>{label}</FormLabel>
<FormValue>
<Field {...other} as={TextField} />
</FormValue>
</FormRow>
);
}
export function FormSubmit({text}) {
return (
<FormRow>
<input type="submit" value={text}/>
</FormRow>
);
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export function TextField({ ...other }) {
return <input type="text" {...other}></input>;
}

View File

@@ -0,0 +1,7 @@
import styled from 'styled-components';
export const Grid = styled.div``;
export const Row = styled.div``;
export const Col = styled.div``;