Move Button and Label components to `@woocommerce/blocks-checkout` package (https://github.com/woocommerce/woocommerce-blocks/pull/4222)
* Move Button to checkout package * Move Label to Components Package
This commit is contained in:
parent
57c5b0c532
commit
983ce48cad
|
@ -2,7 +2,7 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { __, _n, sprintf } from '@wordpress/i18n';
|
||||
import Button from '@woocommerce/base-components/button';
|
||||
import { Button } from '@woocommerce/blocks-checkout';
|
||||
import { Icon, done as doneIcon } from '@woocommerce/icons';
|
||||
import { useState, useEffect } from '@wordpress/element';
|
||||
import { useAddToCartFormContext } from '@woocommerce/base-context';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import classnames from 'classnames';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
import {
|
||||
useInnerBlockLayoutContext,
|
||||
useProductDataContext,
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import ProductPrice from '@woocommerce/base-components/product-price';
|
||||
import ProductName from '@woocommerce/base-components/product-name';
|
||||
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
||||
|
@ -10,6 +9,7 @@ import {
|
|||
__experimentalApplyCheckoutFilter,
|
||||
mustBeString,
|
||||
mustContain,
|
||||
Label,
|
||||
} from '@woocommerce/blocks-checkout';
|
||||
import PropTypes from 'prop-types';
|
||||
import Dinero from 'dinero.js';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { useCheckoutSubmit } from '@woocommerce/base-context/hooks';
|
||||
import { Icon, done } from '@woocommerce/icons';
|
||||
import Button from '@woocommerce/base-components/button';
|
||||
import { Button } from '@woocommerce/blocks-checkout';
|
||||
|
||||
const PlaceOrderButton = () => {
|
||||
const {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import Button from '@woocommerce/base-components/button';
|
||||
import { Button } from '@woocommerce/blocks-checkout';
|
||||
import { useState } from '@wordpress/element';
|
||||
import isShallowEqual from '@wordpress/is-shallow-equal';
|
||||
import { useValidationContext } from '@woocommerce/base-context';
|
||||
|
|
|
@ -6,8 +6,7 @@ import { _n, sprintf } from '@wordpress/i18n';
|
|||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
import type { ReactElement } from 'react';
|
||||
import type { PackageRateOption } from '@woocommerce/type-defs/shipping';
|
||||
import { Panel } from '@woocommerce/blocks-checkout';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Panel, Label } from '@woocommerce/blocks-checkout';
|
||||
import { useSelectShippingRate } from '@woocommerce/base-context/hooks';
|
||||
import type { CartShippingPackageShippingRate } from '@woocommerce/type-defs/cart';
|
||||
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useState, useEffect, useRef } from '@wordpress/element';
|
||||
import Button from '@woocommerce/base-components/button';
|
||||
import { Button, Panel, Label } from '@woocommerce/blocks-checkout';
|
||||
import { ValidatedTextInput } from '@woocommerce/base-components/text-input';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import LoadingMask from '@woocommerce/base-components/loading-mask';
|
||||
import PropTypes from 'prop-types';
|
||||
import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';
|
||||
|
@ -13,7 +12,6 @@ import {
|
|||
ValidationInputError,
|
||||
useValidationContext,
|
||||
} from '@woocommerce/base-context';
|
||||
import { Panel } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import PropTypes from 'prop-types';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,11 +5,11 @@ import { forwardRef } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import Label from '../label';
|
||||
import './style.scss';
|
||||
|
||||
const TextInput = forwardRef(
|
||||
|
|
|
@ -6,7 +6,7 @@ import { useQueryStateByKey } from '@woocommerce/base-context/hooks';
|
|||
import { useMemo } from '@wordpress/element';
|
||||
import classnames from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import { formatPrice } from '@woocommerce/price-format';
|
||||
import { RemovableChip } from '@woocommerce/base-components/chip';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* Format a min/max price range to display.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { _n, sprintf } from '@wordpress/i18n';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
* The label for an attribute term filter.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { useState, useEffect } from '@wordpress/element';
|
||||
import { PaymentMethodIcons } from '@woocommerce/base-components/cart-checkout';
|
||||
import Button from '@woocommerce/base-components/button';
|
||||
import { Button } from '@woocommerce/blocks-checkout';
|
||||
import { CHECKOUT_URL } from '@woocommerce/block-settings';
|
||||
import { useCheckoutContext } from '@woocommerce/base-context';
|
||||
import { usePaymentMethods } from '@woocommerce/base-context/hooks';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
import { usePaymentMethods } from '@woocommerce/base-context/hooks';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import Label from '@woocommerce/base-components/label';
|
||||
import { Label } from '@woocommerce/blocks-checkout';
|
||||
import { usePaymentMethodDataContext } from '@woocommerce/base-context';
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,3 +6,5 @@ export { default as ExperimentalOrderMeta } from './order-meta';
|
|||
export { default as ExperimentalOrderShippingPackages } from './order-shipping-packages';
|
||||
export { default as Panel } from './panel';
|
||||
export { SlotFillProvider } from 'wordpress-components';
|
||||
export { default as Button } from './button';
|
||||
export { default as Label } from './label';
|
||||
|
|
Loading…
Reference in New Issue