PluginProbe
Tableberg – Simple Gutenberg Table Block / 1.1.5
Tableberg – Simple Gutenberg Table Block v1.1.5
1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 trunk 0.0.2 0.2.1 0.3.2 0.3.3 0.4.1 0.5.0 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.7 All 42 releases
tableberg / src / elements / bindable-attributes.ts

bindable-attributes.ts in Tableberg – Simple Gutenberg Table Block 1.1.5, at src/elements/bindable-attributes.ts

28 lines 965 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "@wordpress/i18n";
2 import { buttonBindableAttributes } from "../blocks/button/element";
3 import { textBindableAttributes } from "../blocks/text/element";
4 import { imageBindableAttributes } from "../blocks/image/element";
5 import { listBindableAttributes } from "../blocks/list/element";
6 import { BindableAttribute } from "../dynamic-data";
7 import { getExtendedElementDefinition } from "../extensions";
8
9 export function getElementBindableAttributes(
10 elementType: string
11 ): BindableAttribute[] {
12 switch (elementType) {
13 case "text":
14 return textBindableAttributes;
15 case "button":
16 return buttonBindableAttributes;
17 case "image":
18 return imageBindableAttributes;
19 case "list":
20 return listBindableAttributes;
21 default:
22 return (
23 getExtendedElementDefinition(elementType)?.bindableAttributes ||
24 []
25 );
26 }
27 }
28