@carbon/ibm-products
Version:
Carbon for IBM Products
68 lines (67 loc) • 2.37 kB
TypeScript
/**
* Copyright IBM Corp. 2023, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { ReactNode } from 'react';
import '../../global/js/utils/props-helper';
export interface EmptyStateV2Props {
/**
* Props for the action button. Refer to the Carbon Components button documentation for full list of props.
*/
action?: {
text?: string;
};
/**
* Provide an optional class to be applied to the containing node.
*/
className?: string;
/**
* Source for the illustration image if you choose to use your own custom image. Passing an illustration prop will supersede the kind option.
*/
illustration?: string;
/**
* The alt text for the illustration
*/
illustrationDescription?: string;
/**
* Designates the position of the illustration relative to the content
*/
illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
/**
* Empty state illustration theme variations.
* To ensure you use the correct themed illustrations, you can conditionally specify light or dark
* based on your app's current theme value. Example:
* `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
*/
illustrationTheme?: 'light' | 'dark';
/**
* Determines which predefined illustration will be displayed
*/
kind?: 'error' | 'noData' | 'noTags' | 'notFound' | 'notifications' | 'unauthorized';
/**
* Props for the link. Refer to the Carbon Components link documentation for full list of props.
*/
link?: {
text?: string | ReactNode;
};
/**
* Empty state size
*/
size?: 'sm' | 'lg';
/**
* Empty state subtext
*/
subtitle?: string | ReactNode;
/**
* Empty state heading
*/
title: string | ReactNode;
}
/**
* This is the V2 version of the `EmptyState` component. To use you must pass the `v2` prop to the V1 version of the component `EmptyState` and use the props below.
* In order to avoid breaking changes in the future `EmptyStateV2` is not actually directly importable.
* @deprecated
*/
export declare let EmptyStateV2: React.ForwardRefExoticComponent<EmptyStateV2Props & React.RefAttributes<HTMLDivElement>>;