mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 12:56:00 +00:00
save connection, list connections
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { TextField, SelectField } from './inputs';
|
||||
import { Field } from 'formik';
|
||||
import { Field, useFormikContext } from 'formik';
|
||||
|
||||
export const FormRow = styled.div`
|
||||
display: flex;
|
||||
@@ -40,9 +40,10 @@ export function FormSelectField({ label, children, ...other }) {
|
||||
}
|
||||
|
||||
export function FormSubmit({ text }) {
|
||||
return (
|
||||
<FormRow>
|
||||
<input type="submit" value={text} />
|
||||
</FormRow>
|
||||
);
|
||||
return <input type="submit" value={text} />;
|
||||
}
|
||||
|
||||
export function FormButton({ text, onClick, ...other }) {
|
||||
const { values } = useFormikContext();
|
||||
return <input type="button" value={text} onClick={() => onClick(values)} {...other} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user