@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
22 lines (21 loc) • 785 B
TypeScript
import { ComponentLabelProps } from './component-label';
export interface CommonInputProps extends ComponentLabelProps {
name: string;
description?: React.ReactNode;
}
export interface MultipleProps<P extends object, T> {
as: React.ComponentType<P>;
defaultValue: T;
}
declare const Multiple: <P extends object, T>(props: MultipleProps<P, T> & CommonInputProps) => React.JSX.Element;
export interface WithMultipleProps {
multiple?: boolean;
}
/**
* Wrap a given component into a higher order Multiple component.
*/
export declare function withMultiple<P extends CommonInputProps, T = unknown>(WrappedComponent: React.ComponentType<P>, defaultValue: T): {
(props: WithMultipleProps & P): React.JSX.Element;
displayName: string;
};
export default Multiple;