This commit is contained in:
Sam Seay 2021-06-04 07:59:11 +12:00 committed by GitHub
parent c07a5d77a6
commit c7ff1f4b2a
2 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- Fix styling of the advanced filter operator selection. #7005
- Remove the use of Dashicons and replace with @wordpress/icons or gridicons #7020
- Add tree shaking support to this package. #7034
- Deprecate the Count component, with plan to remove in next major version. #7115
- Remove the long deprecated Card component (use Card from `@wordpress/components` instead). #7114
# 6.2.0

View File

@ -3,6 +3,7 @@
*/
import { __, sprintf } from '@wordpress/i18n';
import PropTypes from 'prop-types';
import deprecated from '@wordpress/deprecated';
/**
* Display a number with a styled border.
@ -13,6 +14,13 @@ import PropTypes from 'prop-types';
* @return {Object} -
*/
const Count = ( { count, label } ) => {
deprecated( 'Count', {
version: '7.2.0',
alternative: '@woocommerce/components Badge',
plugin: 'WooCommerce',
hint: 'Use `import { Badge } from "@woocommerce/components"`',
} );
if ( ! label ) {
label = sprintf( __( 'Total %d', 'woocommerce-admin' ), count );
}