fix: add generic type support for CmsWidget and CmsWidgetParam (#6018)
This commit is contained in:
parent
f1e5dbc9ea
commit
83fc5018a5
12
packages/netlify-cms-core/index.d.ts
vendored
12
packages/netlify-cms-core/index.d.ts
vendored
@ -462,16 +462,16 @@ declare module 'netlify-cms-core' {
|
|||||||
fieldsMetaData: Map<string, any>;
|
fieldsMetaData: Map<string, any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsWidgetParam {
|
export interface CmsWidgetParam<T = any> {
|
||||||
name: string;
|
name: string;
|
||||||
controlComponent: CmsWidgetControlProps;
|
controlComponent: CmsWidgetControlProps<T>;
|
||||||
previewComponent?: CmsWidgetPreviewProps;
|
previewComponent?: CmsWidgetPreviewProps<T>;
|
||||||
globalStyles?: any;
|
globalStyles?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsWidget {
|
export interface CmsWidget<T = any> {
|
||||||
control: CmsWidgetControlProps;
|
control: CmsWidgetControlProps<T>;
|
||||||
preview?: CmsWidgetPreviewProps;
|
preview?: CmsWidgetPreviewProps<T>;
|
||||||
globalStyles?: any;
|
globalStyles?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user