mysql, mssql connect

This commit is contained in:
Jan Prochazka
2020-01-01 19:34:34 +01:00
parent 8d949f52c4
commit 4da867e725
8 changed files with 110 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
import React from 'react';
import styled from 'styled-components';
import { TextField } from './inputs';
import { TextField, SelectField } from './inputs';
import { Field } from 'formik';
export const FormRow = styled.div`
@@ -26,10 +26,23 @@ export function FormTextField({ label, ...other }) {
);
}
export function FormSubmit({text}) {
export function FormSelectField({ label, children, ...other }) {
return (
<FormRow>
<input type="submit" value={text}/>
<FormLabel>{label}</FormLabel>
<FormValue>
<Field {...other} as={SelectField}>
{children}
</Field>
</FormValue>
</FormRow>
);
}
export function FormSubmit({ text }) {
return (
<FormRow>
<input type="submit" value={text} />
</FormRow>
);
}

View File

@@ -3,3 +3,11 @@ import React from 'react';
export function TextField({ ...other }) {
return <input type="text" {...other}></input>;
}
export function SelectField({ children, ...other }) {
return (
<select {...other}>
{children}
</select>
);
}