Browse Source

Add BlockCategoryOptions

pull/4591/head
Artur Arseniev 4 years ago
parent
commit
270d196495
  1. 9
      index.d.ts

9
index.d.ts

@ -1580,6 +1580,13 @@ declare namespace grapesjs {
): HTMLElement; ): HTMLElement;
} }
interface BlockCategoryOptions {
id: string,
label: string,
open?: boolean,
attributes?: Record<string, any>,
}
interface BlockOptions { interface BlockOptions {
/** /**
* Block label, eg. `My block` * Block label, eg. `My block`
@ -1598,7 +1605,7 @@ declare namespace grapesjs {
* Block category, eg. `Basic blocks` * Block category, eg. `Basic blocks`
* @defaultValue '' * @defaultValue ''
*/ */
category?: string; category?: string | BlockCategoryOptions;
/** /**
* If true, triggers the `active` event on the dropped component. * If true, triggers the `active` event on the dropped component.
*/ */

Loading…
Cancel
Save