Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 836559d

Browse files
authored
Move Label component to components package (#11275)
1 parent 43978d7 commit 836559d

File tree

17 files changed

+15
-15
lines changed

17 files changed

+15
-15
lines changed

assets/js/atomic/blocks/product-elements/sale-badge/block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { __ } from '@wordpress/i18n';
55
import classnames from 'classnames';
6-
import Label from '@woocommerce/base-components/label';
6+
import { Label } from '@woocommerce/blocks-components';
77
import {
88
useInnerBlockLayoutContext,
99
useProductDataContext,

assets/js/base/components/cart-checkout/order-summary/order-summary-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import classnames from 'classnames';
55
import { sprintf, _n } from '@wordpress/i18n';
6-
import Label from '@woocommerce/base-components/label';
6+
import { Label } from '@woocommerce/blocks-components';
77
import ProductPrice from '@woocommerce/base-components/product-price';
88
import ProductName from '@woocommerce/base-components/product-name';
99
import {

assets/js/base/components/cart-checkout/shipping-rates-control-package/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import classNames from 'classnames';
55
import { _n, sprintf } from '@wordpress/i18n';
66
import { decodeEntities } from '@wordpress/html-entities';
77
import { Panel } from '@woocommerce/blocks-checkout';
8-
import Label from '@woocommerce/base-components/label';
8+
import { Label } from '@woocommerce/blocks-components';
99
import { useCallback } from '@wordpress/element';
1010
import { useShippingData } from '@woocommerce/base-context/hooks';
1111
import { sanitizeHTML } from '@woocommerce/utils';

assets/js/base/components/filter-element-label/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* External dependencies
33
*/
44
import { _n, sprintf } from '@wordpress/i18n';
5-
import Label from '@woocommerce/base-components/label';
5+
import { Label } from '@woocommerce/blocks-components';
66

77
/**
88
* Internal dependencies

assets/js/base/components/filter-reset-button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { __ } from '@wordpress/i18n';
55
import classNames from 'classnames';
6-
import Label from '@woocommerce/base-components/label';
6+
import { Label } from '@woocommerce/blocks-components';
77

88
/**
99
* Internal dependencies

assets/js/base/components/filter-submit-button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { __ } from '@wordpress/i18n';
55
import classNames from 'classnames';
6-
import Label from '@woocommerce/base-components/label';
6+
import { Label } from '@woocommerce/blocks-components';
77

88
/**
99
* Internal dependencies

assets/js/base/components/load-more-button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* External dependencies
33
*/
44
import { __ } from '@wordpress/i18n';
5-
import Label from '@woocommerce/base-components/label';
65
import type { MouseEventHandler } from 'react';
76

87
/**
98
* Internal dependencies
109
*/
1110
import './style.scss';
11+
import Label from '../../../../../packages/components/label'; // Imported like this because importing from the components package loads the data stores unnecessarily - not a problem in the front end but would require a lot of unit test rewrites to prevent breaking tests due to incorrect mocks.
1212

1313
interface LoadMoreButtonProps {
1414
onClick: MouseEventHandler;

assets/js/base/components/pagination/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { __, sprintf } from '@wordpress/i18n';
55
import classNames from 'classnames';
6-
import Label from '@woocommerce/base-components/label';
6+
import { Label } from '@woocommerce/blocks-components';
77

88
/**
99
* Internal dependencies

assets/js/base/components/sort-select/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
* External dependencies
33
*/
44
import classNames from 'classnames';
5-
import Label from '@woocommerce/base-components/label';
65
import { withInstanceId } from '@wordpress/compose';
76
import type { ChangeEventHandler } from 'react';
87

98
/**
109
* Internal dependencies
1110
*/
1211
import './style.scss';
12+
import Label from '../../../../../packages/components/label'; // Imported like this because importing from the components package loads the data stores unnecessarily - not a problem in the front end but would require a lot of unit test rewrites to prevent breaking tests due to incorrect mocks.
1313

1414
interface SortSelectProps {
1515
/**

assets/js/blocks/active-filters/block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useQueryStateByKey } from '@woocommerce/base-context/hooks';
66
import { getSetting, getSettingWithCoercion } from '@woocommerce/settings';
77
import { useMemo, useEffect, useState } from '@wordpress/element';
88
import classnames from 'classnames';
9-
import Label from '@woocommerce/base-components/label';
9+
import { Label } from '@woocommerce/blocks-components';
1010
import {
1111
isAttributeQueryCollection,
1212
isBoolean,

0 commit comments

Comments
 (0)