File size: 532 Bytes
3201ca6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import React from "react";

interface EmptyStateProps {
  inputValue: string;
  searchMessage?: string;
  emptyMessage?: string;
  testId?: string;
}

export function EmptyState({
  inputValue,
  searchMessage = "No items found",
  emptyMessage = "No items available",
  testId = "dropdown-empty",
}: EmptyStateProps) {
  return (
    <li
      className="px-3 py-2 text-[var(--oh-text-secondary)] text-sm rounded-lg mx-0.5 my-0.5"
      data-testid={testId}
    >
      {inputValue ? searchMessage : emptyMessage}
    </li>
  );
}