The error state component repurposes the EmptyState
component to display an error to users. To further customize this component, you can also utilize all properties of the empty state component, with the exception
of children
.
Examples
Basic error state
To provide users with error details, a basic error state should contain an appropriate and informative titleText
and bodyText
.
Sample error title
Sample error description
Props
ErrorState
Name | Type | Default | Description |
---|---|---|---|
bodyText | React.ReactNode | A description of the error, if no body text is provided then it will be set to the defaultBodyText. | |
customFooter | React.ReactNode | Custom footer content | |
defaultBodyText | React.ReactNode | A default description of the error used if no errorDescription is provided. | |
ouiaId | string | number | "ErrorState" | ErrorState OUIA ID |
titleText | string | 'Something went wrong' | Title of the error. |