Deprecate the no longer used Count component (https://github.com/woocommerce/woocommerce-admin/pull/7115)
This commit is contained in:
parent
c07a5d77a6
commit
c7ff1f4b2a
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue