import { Info } from 'lucide-react'; import type { CSSProperties, Ref } from 'react'; import { PlatformIconButton } from './PlatformIconButton'; /** 画布卡片共用的类型标签与信息入口,不承接资源业务状态。 */ export function CanvasCardCornerActions({ kindLabel, kindAriaLabel, kindClassName, infoLabel, style, kindRef, onKindClick, onInfoClick, infoPressed, }: { kindLabel?: string | null; kindAriaLabel?: string; kindClassName?: string; infoLabel: string; style?: CSSProperties; kindRef?: Ref; onKindClick?: () => void; onInfoClick: () => void; infoPressed?: boolean; }) { return ( event.stopPropagation()} onClick={(event) => event.stopPropagation()} onKeyDown={(event) => event.stopPropagation()} > {kindLabel ? ( { if (onKindClick && (event.key === 'Enter' || event.key === ' ')) { event.preventDefault(); onKindClick(); } }} > {kindLabel} ) : null} ); }