import React from 'react'; import { ButtonProps } from '../../'; import { IconName } from '@harnessio/icons'; export interface PageBodyProps { /** If set to true, spinner should be shown */ loading?: boolean; /** message to pass to */ loadingMessage?: string; /** If not nullable, show page error */ error?: React.ReactNode; /** If passed, render 'Retry' button alongside error message */ retryOnError?: ButtonProps['onClick']; /** noData structure */ noData?: { /** when true, show */ when: () => boolean; /** icon to pass to */ icon?: IconName; /** disables color passing to icon in */ noIconColor?: boolean; /** image to pass to */ image?: string; /** image class name to pass to */ imageClassName?: string; /** message title to pass to */ messageTitle?: string; /** message to pass to */ message?: string; /** Button to render with custom styles */ button?: React.ReactElement; /** button text to pass to */ buttonText?: string; /** onClick event handler to pass to */ onClick?: ButtonProps['onClick']; /** class name to pass for no data */ className?: string; /** boolean value to decide button state in */ buttonDisabled?: boolean; /** string to add tooltip on the button if disabled */ buttonDisabledTooltip?: string; }; /** True if Page does not have header */ filled?: boolean; /** Optional classname */ className?: string; } /** * PageBody implements page body container with some decorations like background image, * alignments, etc... */ export declare const PageBody: React.FC;