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>;
|
||||
}
|
||||
|
||||
export interface CmsWidgetParam {
|
||||
export interface CmsWidgetParam<T = any> {
|
||||
name: string;
|
||||
controlComponent: CmsWidgetControlProps;
|
||||
previewComponent?: CmsWidgetPreviewProps;
|
||||
controlComponent: CmsWidgetControlProps<T>;
|
||||
previewComponent?: CmsWidgetPreviewProps<T>;
|
||||
globalStyles?: any;
|
||||
}
|
||||
|
||||
export interface CmsWidget {
|
||||
control: CmsWidgetControlProps;
|
||||
preview?: CmsWidgetPreviewProps;
|
||||
export interface CmsWidget<T = any> {
|
||||
control: CmsWidgetControlProps<T>;
|
||||
preview?: CmsWidgetPreviewProps<T>;
|
||||
globalStyles?: any;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user