fix(typings): add types for boolean and color widgets (#4663)

Co-authored-by: Aleksandr Sapronov <aleksandr.sapronov@dsr-corporation.com>
This commit is contained in:
ScRiB2 2020-11-30 19:53:15 +03:00 committed by GitHub
parent 74d5569bd3
commit 8772664952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,11 @@ declare module 'netlify-cms-core' {
i18n?: boolean | 'translate' | 'duplicate';
}
export interface CmsFieldBoolean {
widget: 'boolean';
default?: boolean;
}
export interface CmsFieldCode {
widget: 'code';
default?: any;
@ -75,6 +80,14 @@ declare module 'netlify-cms-core' {
output_code_only?: boolean;
}
export interface CmsFieldColor {
widget: 'color';
default?: string;
allowInput?: boolean;
enableAlpha?: boolean;
}
export interface CmsFieldDateTime {
widget: 'datetime';
default?: string;
@ -225,7 +238,9 @@ declare module 'netlify-cms-core' {
export type CmsField = CmsFieldBase &
(
| CmsFieldBoolean
| CmsFieldCode
| CmsFieldColor
| CmsFieldDateTime
| CmsFieldFileOrImage
| CmsFieldList