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';
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user