import { __ } from '@wordpress/i18n'; type Capabilities = Record; type Props = { ready: boolean; canUndo: boolean; canRedo: boolean; formatValue: string; onFormatChange: (value: string) => void; capabilities: Capabilities; onCommand: (name: string, value?: string) => void; onRememberSelection: () => void; onOpenLink: () => void; onOpenMedia: (type: 'image' | 'video') => void; }; export function EditorToolbar({ ready, canUndo, canRedo, formatValue, onFormatChange, capabilities, onCommand, onRememberSelection, onOpenLink, onOpenMedia, }: Props) { return (
{ onRememberSelection(); if ((event.target as HTMLElement).closest('button')) event.preventDefault(); }} >