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:
parent
74d5569bd3
commit
8772664952
15
packages/netlify-cms-core/index.d.ts
vendored
15
packages/netlify-cms-core/index.d.ts
vendored
@ -65,6 +65,11 @@ declare module 'netlify-cms-core' {
|
|||||||
i18n?: boolean | 'translate' | 'duplicate';
|
i18n?: boolean | 'translate' | 'duplicate';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CmsFieldBoolean {
|
||||||
|
widget: 'boolean';
|
||||||
|
default?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface CmsFieldCode {
|
export interface CmsFieldCode {
|
||||||
widget: 'code';
|
widget: 'code';
|
||||||
default?: any;
|
default?: any;
|
||||||
@ -75,6 +80,14 @@ declare module 'netlify-cms-core' {
|
|||||||
output_code_only?: boolean;
|
output_code_only?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CmsFieldColor {
|
||||||
|
widget: 'color';
|
||||||
|
default?: string;
|
||||||
|
|
||||||
|
allowInput?: boolean;
|
||||||
|
enableAlpha?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface CmsFieldDateTime {
|
export interface CmsFieldDateTime {
|
||||||
widget: 'datetime';
|
widget: 'datetime';
|
||||||
default?: string;
|
default?: string;
|
||||||
@ -225,7 +238,9 @@ declare module 'netlify-cms-core' {
|
|||||||
|
|
||||||
export type CmsField = CmsFieldBase &
|
export type CmsField = CmsFieldBase &
|
||||||
(
|
(
|
||||||
|
| CmsFieldBoolean
|
||||||
| CmsFieldCode
|
| CmsFieldCode
|
||||||
|
| CmsFieldColor
|
||||||
| CmsFieldDateTime
|
| CmsFieldDateTime
|
||||||
| CmsFieldFileOrImage
|
| CmsFieldFileOrImage
|
||||||
| CmsFieldList
|
| CmsFieldList
|
||||||
|
Loading…
x
Reference in New Issue
Block a user