# tableberg/1.1.5/components/editor/BorderRadiusControl.tsx

Tableberg – Simple Gutenberg Table Block, version 1.1.5. 64 lines.

- Page: https://pluginprobe.com/plugins/tableberg/1.1.5/code/components/editor/BorderRadiusControl.tsx
- Raw: https://pluginprobe.com/plugins/tableberg/1.1.5/raw/components/editor/BorderRadiusControl.tsx
- Modified: 2026-09-16T03:30:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tableberg/1.1.5/code/components/editor/BorderRadiusControl.tsx#L10-L20`.

```tsx
/**
 * WordPress Dependencies
 */
import { __ } from "@wordpress/i18n";
import {
    useBlockEditContext,
    __experimentalBorderRadiusControl as RadiusControl,
} from "@wordpress/block-editor";
import { __experimentalToolsPanelItem as ToolsPanelItem } from "@wordpress/components";

interface BorderRadiusControlPropTypes {
    label: string;
    value: any;
    hasValue: () => boolean;
    onChange: (newBorder: any) => any;
    resetAllFilter?: () => any;
    onDeselect: () => any;
    isShownByDefault?: boolean;
}

function BorderRadiusControl({
    label,
    isShownByDefault = true,
    value,
    hasValue,
    onChange = () => {},
    resetAllFilter,
    onDeselect = () => {},
}: BorderRadiusControlPropTypes) {
    const { clientId } = useBlockEditContext();

    if (!resetAllFilter) {
        resetAllFilter = onDeselect;
    }

    const handleChange = (value: any) => {
        if (typeof value === "string") {
            onChange({
                topLeft: value,
                topRight: value,
                bottomLeft: value,
                bottomRight: value,
            });
            return;
        }
        onChange(value);
    };

    return (
        <ToolsPanelItem
            panelId={clientId}
            isShownByDefault={isShownByDefault}
            resetAllFilter={resetAllFilter}
            hasValue={hasValue}
            label={label}
            onDeselect={onDeselect}
        >
            <RadiusControl onChange={handleChange} values={value} />
        </ToolsPanelItem>
    );
}

export default BorderRadiusControl;

```
