fix: updates field description type to include react nodes

This commit is contained in:
Jacob Fletcher
2021-11-10 11:12:52 -05:00
parent a7525e2931
commit 291c193ad4
5 changed files with 25 additions and 23 deletions

View File

@@ -2,9 +2,9 @@ import React from 'react';
export type DescriptionFunction = (value: unknown) => string
export type DescriptionComponent = React.ComponentType<{value: unknown}>
export type DescriptionComponent = React.ComponentType<{ value: unknown }>
type Description = string | DescriptionFunction | DescriptionComponent
export type Description = string | DescriptionFunction | DescriptionComponent
export type Props = {
description?: Description

View File

@@ -1,7 +1,8 @@
import { Data } from '../../Form/types';
import { ArrayField, Labels, Field, Description } from '../../../../../fields/config/types';
import { ArrayField, Labels, Field } from '../../../../../fields/config/types';
import { FieldTypes } from '..';
import { FieldPermissions } from '../../../../../auth/types';
import { Description } from '../../FieldDescription/types';
export type Props = Omit<ArrayField, 'type'> & {
path?: string

View File

@@ -1,7 +1,8 @@
import { Data } from '../../Form/types';
import { BlockField, Labels, Block, Description } from '../../../../../fields/config/types';
import { BlockField, Labels, Block } from '../../../../../fields/config/types';
import { FieldTypes } from '..';
import { FieldPermissions } from '../../../../../auth/types';
import { Description } from '../../FieldDescription/types';
export type Props = Omit<BlockField, 'type'> & {
path?: string

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { Description, Validate } from '../../../../../fields/config/types';
import { Validate } from '../../../../../fields/config/types';
import { Description } from '../../FieldDescription/types';
export type Props = {
autoComplete?: string