woocommerce/plugins/woocommerce-admin/packages/components/src/empty-content
Darren Ethier fee65dd6ac Decouple wcSettings from published packages. (https://github.com/woocommerce/woocommerce-admin/pull/3001)
* refactor wcSettings in components to use new api

* update test snapshot

* refactor wcSettings in other packages

* fix how defaults are set for setting

* decouple siteLocale from ReportsFilters and AdvancedFilters

* Decouple currency settings from packages

AdvancedFilters, ReportFilters, and NumberFilters now receive currency info as props.

* decouple currency settings from `ReportChart`

* decouple `wcAdminAssetsUrl` setting from `EmptyContent`

- also refactors to remove the need for `ImageAsset` component.

* decouple OrderStatus from wcSettings

* decouple wcAdminUrl setting from ProductImage component

- this also implements a SVG for default product image.

* remove export for image-asset that is no longer present

* remove console.log

* update test snapshots for ProductImage
2019-10-11 11:45:45 -04:00
..
docs Convert markdown JSX code blocks to actual JS files for component documentation. 2019-09-06 11:37:18 -07:00
README.md Fetch component usage documentation from local README.md. 2019-09-06 11:52:18 -07:00
index.js Decouple wcSettings from published packages. (https://github.com/woocommerce/woocommerce-admin/pull/3001) 2019-10-11 11:45:45 -04:00
style.scss Make EmptyContent component fit narrow viewports (https://github.com/woocommerce/woocommerce-admin/pull/1703) 2019-02-28 09:42:11 +01:00

README.md

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

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

Props

Name Type Default Description
title String null (required) The title to be displayed
message String null An additional message to be displayed
illustration String '/empty-content.svg' The url string of an image path. Prefix with / to load an image relative to the plugin directory
illustrationHeight Number null Height to use for the illustration
illustrationWidth Number 400 Width to use for the illustration
actionLabel String null (required) Label to be used for the primary action button
actionURL String null URL to be used for the primary action button
actionCallback Function null Callback to be used for the primary action button
secondaryActionLabel String null Label to be used for the secondary action button
secondaryActionURL String null URL to be used for the secondary action button
secondaryActionCallback Function null Callback to be used for the secondary action button
className String null Additional CSS classes