PluginProbe
Tableberg – Simple Gutenberg Table Block / 1.2.0
Tableberg – Simple Gutenberg Table Block v1.2.0
1.2.0 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 All 43 releases
tableberg / components / editor / TextDecorationControl.tsx

TextDecorationControl.tsx in Tableberg – Simple Gutenberg Table Block 1.2.0, at components/editor/TextDecorationControl.tsx

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "@wordpress/i18n";
2 import { __experimentalTextDecorationControl as WPTextDecorationControl } from "@wordpress/block-editor";
3
4 import TypographyPanelItem, {
5 TypographyControlProps,
6 } from "./TypographyPanelItem";
7
8 export default function TextDecorationControl({
9 label = __("Decoration", "tableberg"),
10 value,
11 onChange,
12 onDeselect,
13 resetAllFilter,
14 isShownByDefault = false,
15 isSingleColumn = true,
16 panelId,
17 }: TypographyControlProps) {
18 return (
19 <TypographyPanelItem
20 label={label}
21 hasValue={() => !!value}
22 onDeselect={onDeselect ?? (() => onChange(""))}
23 resetAllFilter={resetAllFilter}
24 isShownByDefault={isShownByDefault}
25 isSingleColumn={isSingleColumn}
26 panelId={panelId}
27 >
28 <WPTextDecorationControl
29 value={value || undefined}
30 onChange={newValue => onChange(newValue || "")}
31 />
32 </TypographyPanelItem>
33 );
34 }
35