Back to Woocommerce

README

packages/js/components/src/empty-content/README.md

10.8.0-dev1.4 KB
Original Source

EmptyContent

A component to be used when there is no data to show. It can be used as an opportunity to provide explanation or guidance to help a user progress.

Usage

jsx
<EmptyContent
	title="Nothing here"
	message="Some descriptive text"
	actionLabel="Reload page"
	actionURL="#"
/>

Props

NameTypeDefaultDescription
titleStringnull(required) The title to be displayed
messageStringnullAn additional message to be displayed
illustrationString'/empty-content.svg'The url string of an image path. Prefix with / to load an image relative to the plugin directory
illustrationHeightNumbernullHeight to use for the illustration
illustrationWidthNumber400Width to use for the illustration
actionLabelStringnull(required) Label to be used for the primary action button
actionURLStringnullURL to be used for the primary action button
actionCallbackFunctionnullCallback to be used for the primary action button
secondaryActionLabelStringnullLabel to be used for the secondary action button
secondaryActionURLStringnullURL to be used for the secondary action button
secondaryActionCallbackFunctionnullCallback to be used for the secondary action button
classNameStringnullAdditional CSS classes