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 / LineHeightControl.tsx

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

37 lines 1.1 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 { LineHeightControl as WPLineHeightControl } from "@wordpress/block-editor";
3
4 import TypographyPanelItem, {
5 TypographyControlProps,
6 } from "./TypographyPanelItem";
7
8 export default function LineHeightControl({
9 label = __("Line height", "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 <WPLineHeightControl
29 __next40pxDefaultSize
30 __unstableInputWidth="auto"
31 value={value || undefined}
32 onChange={newValue => onChange(newValue || "")}
33 />
34 </TypographyPanelItem>
35 );
36 }
37