mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 15:56:00 +00:00
extract date fields macro
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import _ from 'lodash';
|
||||
import styled from 'styled-components';
|
||||
import {
|
||||
FormTextField,
|
||||
FormSubmit,
|
||||
@@ -11,6 +12,9 @@ import {
|
||||
} from '../utility/forms';
|
||||
import { Formik, Form, useFormikContext } from 'formik';
|
||||
|
||||
const MacroArgumentsWrapper = styled.div`
|
||||
`;
|
||||
|
||||
function MacroArgument({ arg, namePrefix }) {
|
||||
const name = `${namePrefix}${arg.name}`;
|
||||
if (arg.type == 'text') {
|
||||
@@ -37,12 +41,12 @@ function MacroArgumentList({ args, onChangeValues, namePrefix }) {
|
||||
if (onChangeValues) onChangeValues(values);
|
||||
}, [values]);
|
||||
return (
|
||||
<>
|
||||
<MacroArgumentsWrapper>
|
||||
{' '}
|
||||
{args.map((arg) => (
|
||||
<MacroArgument arg={arg} key={arg.name} namePrefix={namePrefix} />
|
||||
))}
|
||||
</>
|
||||
</MacroArgumentsWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user