import { useCommand } from '@embedpdf/react/commands'; import { Icon } from './icon'; export function CommandButton({ id }: { id: string }) { const command = useCommand(id); if (!command.visible) return null; return ( ); }