mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
26 lines
690 B
JavaScript
26 lines
690 B
JavaScript
import React from 'react';
|
|
import { string } from 'prop-types';
|
|
import { Field } from 'react-final-form';
|
|
import DateRangeController from './DateRangeController';
|
|
|
|
const component = props => {
|
|
const { input, controllerRef, ...rest } = props;
|
|
const { type, ...restOfInput } = input;
|
|
return <DateRangeController ref={controllerRef} {...restOfInput} {...rest} />;
|
|
};
|
|
|
|
const FieldDateRangeController = props => {
|
|
return <Field component={component} {...props} />;
|
|
};
|
|
|
|
FieldDateRangeController.defaultProps = {
|
|
rootClassName: null,
|
|
className: null,
|
|
};
|
|
|
|
FieldDateRangeController.propTypes = {
|
|
rootClassName: string,
|
|
className: string,
|
|
};
|
|
|
|
export default FieldDateRangeController;
|