mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 07:56:01 +00:00
form buttons styling
This commit is contained in:
@@ -2,12 +2,19 @@ import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { TextField, SelectField } from './inputs';
|
||||
import { Field, useFormikContext } from 'formik';
|
||||
import FormStyledButton from '../widgets/FormStyledButton';
|
||||
|
||||
export const FormRow = styled.div`
|
||||
display: flex;
|
||||
margin: 10px;
|
||||
`;
|
||||
|
||||
export const FormButtonRow = styled.div`
|
||||
display: flex;
|
||||
// justify-content: flex-end;
|
||||
margin: 10px;
|
||||
`;
|
||||
|
||||
export const FormLabel = styled.div`
|
||||
width: 10vw;
|
||||
font-weight: bold;
|
||||
@@ -40,10 +47,10 @@ export function FormSelectField({ label, children, ...other }) {
|
||||
}
|
||||
|
||||
export function FormSubmit({ text }) {
|
||||
return <input type="submit" value={text} />;
|
||||
return <FormStyledButton type="submit" value={text} />;
|
||||
}
|
||||
|
||||
export function FormButton({ text, onClick, ...other }) {
|
||||
const { values } = useFormikContext();
|
||||
return <input type="button" value={text} onClick={() => onClick(values)} {...other} />;
|
||||
return <FormStyledButton type="button" value={text} onClick={() => onClick(values)} {...other} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user