EmptyState

This component provides EmptyState functionality.

Props

  • prop1: Description of prop1.
  • prop2: Description of prop2.

Usage

import { EmptyState } from './EmptyState';

const props = {};

<EmptyState prop1="value1" prop2="value2" />;
import type { FC, ReactNode } from 'react';

import { Card } from './Card';

interface EmptyStateProps {
  message: ReactNode;
  icon: ReactNode;
  hideCard?: boolean;
}

export const EmptyState: FC<EmptyStateProps> = ({
  message,
  icon,
  hideCard = false
}) => {
  return (
    <Card
      className={hideCard ? 'border-0 !bg-transparent !shadow-none' : ''}
      forceRounded
    >
      <div className="grid justify-items-center space-y-2 p-5">
        <div>{icon}</div>
        <div>{message}</div>
      </div>
    </Card>
  );
};