Move `FormattedMonetaryAmount` to the components package (https://github.com/woocommerce/woocommerce-blocks/pull/11230)
This commit is contained in:
parent
c9ae690a0b
commit
38759c4e84
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
import { createInterpolateElement } from '@wordpress/element';
|
import { createInterpolateElement } from '@wordpress/element';
|
||||||
import { __, sprintf } from '@wordpress/i18n';
|
import { __, sprintf } from '@wordpress/i18n';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import type { Currency } from '@woocommerce/price-format';
|
import type { Currency } from '@woocommerce/price-format';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
import { decodeEntities } from '@wordpress/html-entities';
|
import { decodeEntities } from '@wordpress/html-entities';
|
||||||
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import type { PackageRateOption } from '@woocommerce/types';
|
import type { PackageRateOption } from '@woocommerce/types';
|
||||||
import { getSetting } from '@woocommerce/settings';
|
import { getSetting } from '@woocommerce/settings';
|
||||||
import { CartShippingPackageShippingRate } from '@woocommerce/types';
|
import { CartShippingPackageShippingRate } from '@woocommerce/types';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
import { __, sprintf } from '@wordpress/i18n';
|
import { __, sprintf } from '@wordpress/i18n';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { createInterpolateElement } from '@wordpress/element';
|
import { createInterpolateElement } from '@wordpress/element';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import { applyCheckoutFilter, TotalsItem } from '@woocommerce/blocks-checkout';
|
import { applyCheckoutFilter, TotalsItem } from '@woocommerce/blocks-checkout';
|
||||||
import { useStoreCart } from '@woocommerce/base-context/hooks';
|
import { useStoreCart } from '@woocommerce/base-context/hooks';
|
||||||
import { getSetting } from '@woocommerce/settings';
|
import { getSetting } from '@woocommerce/settings';
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {
|
||||||
useLayoutEffect,
|
useLayoutEffect,
|
||||||
} from '@wordpress/element';
|
} from '@wordpress/element';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import { Currency, isObject } from '@woocommerce/types';
|
import { Currency, isObject } from '@woocommerce/types';
|
||||||
import { useDebouncedCallback } from 'use-debounce';
|
import { useDebouncedCallback } from 'use-debounce';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* External dependencies
|
* External dependencies
|
||||||
*/
|
*/
|
||||||
import { __, sprintf } from '@wordpress/i18n';
|
import { __, sprintf } from '@wordpress/i18n';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { formatPrice } from '@woocommerce/price-format';
|
import { formatPrice } from '@woocommerce/price-format';
|
||||||
import { createInterpolateElement } from '@wordpress/element';
|
import { createInterpolateElement } from '@wordpress/element';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
} from '@wordpress/element';
|
} from '@wordpress/element';
|
||||||
import { useShippingData, useStoreCart } from '@woocommerce/base-context/hooks';
|
import { useShippingData, useStoreCart } from '@woocommerce/base-context/hooks';
|
||||||
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import { decodeEntities } from '@wordpress/html-entities';
|
import { decodeEntities } from '@wordpress/html-entities';
|
||||||
import { getSetting } from '@woocommerce/settings';
|
import { getSetting } from '@woocommerce/settings';
|
||||||
import { Icon, mapMarker } from '@wordpress/icons';
|
import { Icon, mapMarker } from '@wordpress/icons';
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { __ } from '@wordpress/i18n';
|
||||||
import { getSetting } from '@woocommerce/settings';
|
import { getSetting } from '@woocommerce/settings';
|
||||||
import { createInterpolateElement } from '@wordpress/element';
|
import { createInterpolateElement } from '@wordpress/element';
|
||||||
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import type { CartShippingPackageShippingRate } from '@woocommerce/type-defs/cart';
|
import type { CartShippingPackageShippingRate } from '@woocommerce/type-defs/cart';
|
||||||
|
|
||||||
export const RatePrice = ( {
|
export const RatePrice = ( {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
isAddressComplete,
|
isAddressComplete,
|
||||||
} from '@woocommerce/base-utils';
|
} from '@woocommerce/base-utils';
|
||||||
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
import { FormattedMonetaryAmount } from '@woocommerce/blocks-components';
|
||||||
import { useEditorContext, noticeContexts } from '@woocommerce/base-context';
|
import { useEditorContext, noticeContexts } from '@woocommerce/base-context';
|
||||||
import { StoreNoticesContainer } from '@woocommerce/blocks-checkout';
|
import { StoreNoticesContainer } from '@woocommerce/blocks-checkout';
|
||||||
import { decodeEntities } from '@wordpress/html-entities';
|
import { decodeEntities } from '@wordpress/html-entities';
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
*/
|
*/
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { isValidElement } from '@wordpress/element';
|
import { isValidElement } from '@wordpress/element';
|
||||||
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
|
||||||
import type { ReactElement, ReactNode } from 'react';
|
import type { ReactElement, ReactNode } from 'react';
|
||||||
import type { Currency } from '@woocommerce/price-format';
|
import type { Currency } from '@woocommerce/price-format';
|
||||||
|
|
||||||
|
@ -11,6 +10,7 @@ import type { Currency } from '@woocommerce/price-format';
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
import FormattedMonetaryAmount from '../../../../components/formatted-monetary-amount';
|
||||||
|
|
||||||
export interface TotalsItemProps {
|
export interface TotalsItemProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
export { default as CheckboxList } from './checkbox-list';
|
export { default as CheckboxList } from './checkbox-list';
|
||||||
|
export { default as FormattedMonetaryAmount } from './formatted-monetary-amount';
|
||||||
export { Chip, RemovableChip } from './chip';
|
export { Chip, RemovableChip } from './chip';
|
||||||
|
|
Loading…
Reference in New Issue