File size: 847 Bytes
9b906ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { ContextMenuListItem } from "#/components/features/context-menu/context-menu-list-item";
import { dropdownMenuRowIconWrapperClassName } from "#/utils/dropdown-classes";

interface ServerStatusContextMenuIconTextProps {
  icon: React.ReactNode;
  text: string;
  onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
  testId?: string;
}

export function ServerStatusContextMenuIconText({
  icon,
  text,
  onClick,
  testId,
}: ServerStatusContextMenuIconTextProps) {
  return (
    <ContextMenuListItem testId={testId} onClick={onClick}>
      <div className="flex min-w-0 w-full items-center justify-between gap-2">
        <span className="min-w-0 truncate">{text}</span>
        <span className={dropdownMenuRowIconWrapperClassName} aria-hidden>
          {icon}
        </span>
      </div>
    </ContextMenuListItem>
  );
}