diff --git a/plugins/woocommerce-blocks/assets/js/base/components/button/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/button/style.scss deleted file mode 100644 index cbef9e383d6..00000000000 --- a/plugins/woocommerce-blocks/assets/js/base/components/button/style.scss +++ /dev/null @@ -1,20 +0,0 @@ -// Extra classes are added for specificity. -.button.wc-block-button, -.editor-styles-wrapper .button.wc-block-button { - background-color: #000; - color: #fff; - display: block; - font-size: inherit; - font-weight: bold; - padding: $gap-small; - text-align: center; - text-decoration: none; - text-transform: none; - - &:hover, - &:focus, - &:active { - background-color: $black; - color: #fff; - } -} diff --git a/plugins/woocommerce-blocks/assets/js/base/components/button/index.js b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/index.js similarity index 100% rename from plugins/woocommerce-blocks/assets/js/base/components/button/index.js rename to plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/index.js diff --git a/plugins/woocommerce-blocks/assets/js/base/components/button/stories/index.js b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/stories/index.js similarity index 60% rename from plugins/woocommerce-blocks/assets/js/base/components/button/stories/index.js rename to plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/stories/index.js index 4036460f6f5..e8dc7e6b602 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/button/stories/index.js +++ b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/stories/index.js @@ -8,4 +8,8 @@ export default { component: Button, }; -export const Default = () => ; +export const Default = () => ( +
+ +
+); diff --git a/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/style.scss new file mode 100644 index 00000000000..22fc8e2d0fc --- /dev/null +++ b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/button/style.scss @@ -0,0 +1,24 @@ +// Extra classes are added for specificity. +.wc-block-cart, +.wc-block-checkout { + .button.wc-block-button { + background-color: #000 !important; + color: #fff !important; + display: block; + font-size: inherit; + font-weight: bold; + height: 48px; // same height as text-input + line-height: 1; + padding: $gap-small; + text-align: center; + text-decoration: none; + text-transform: none; + + &:hover, + &:focus, + &:active { + background-color: $black !important; + color: #fff !important; + } + } +} diff --git a/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/index.js b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/index.js new file mode 100644 index 00000000000..31d66cb1d1f --- /dev/null +++ b/plugins/woocommerce-blocks/assets/js/base/components/cart-checkout/index.js @@ -0,0 +1 @@ +export { default as Button } from './button'; diff --git a/plugins/woocommerce-blocks/assets/js/base/components/country-input/country-input.js b/plugins/woocommerce-blocks/assets/js/base/components/country-input/country-input.js index d73887cf190..3ae3c5a68e4 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/country-input/country-input.js +++ b/plugins/woocommerce-blocks/assets/js/base/components/country-input/country-input.js @@ -47,6 +47,7 @@ const CountryInput = ( { onChange( foundOption ? foundOption.key : '' ); } } style={ { + minHeight: '0', height: '0', border: '0', padding: '0', diff --git a/plugins/woocommerce-blocks/assets/js/base/components/shipping-calculator/address.js b/plugins/woocommerce-blocks/assets/js/base/components/shipping-calculator/address.js index 10e8ea7a638..1a4f4b946b5 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/shipping-calculator/address.js +++ b/plugins/woocommerce-blocks/assets/js/base/components/shipping-calculator/address.js @@ -3,7 +3,7 @@ */ import PropTypes from 'prop-types'; import { __ } from '@wordpress/i18n'; -import Button from '@woocommerce/base-components/button'; +import { Button } from '@woocommerce/base-components/cart-checkout'; import { useState } from '@wordpress/element'; import isShallowEqual from '@wordpress/is-shallow-equal'; diff --git a/plugins/woocommerce-blocks/assets/js/base/components/state-input/state-input.js b/plugins/woocommerce-blocks/assets/js/base/components/state-input/state-input.js index 3bda003decd..f5386ff2cff 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/state-input/state-input.js +++ b/plugins/woocommerce-blocks/assets/js/base/components/state-input/state-input.js @@ -79,6 +79,7 @@ const StateInput = ( { onChangeState( event.target.value ) } style={ { + minHeight: '0', height: '0', border: '0', padding: '0', diff --git a/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/index.js b/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/index.js index 3d8b673cb95..a8e94e32dbe 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/index.js +++ b/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; import { useState, useEffect, useRef } from '@wordpress/element'; import { PanelBody, PanelRow } from 'wordpress-components'; -import Button from '@woocommerce/base-components/button'; +import { Button } from '@woocommerce/base-components/cart-checkout'; import TextInput from '@woocommerce/base-components/text-input'; import Label from '@woocommerce/base-components/label'; import PropTypes from 'prop-types'; @@ -13,8 +13,8 @@ import { withInstanceId } from 'wordpress-compose'; /** * Internal dependencies */ -import './style.scss'; import LoadingMask from '../../loading-mask'; +import './style.scss'; const TotalsCouponCodeInput = ( { instanceId, diff --git a/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/style.scss index 6e4b44a72c6..6f62a376097 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/style.scss +++ b/plugins/woocommerce-blocks/assets/js/base/components/totals/totals-coupon-code-input/style.scss @@ -1,17 +1,18 @@ .wc-block-coupon-code__form { display: flex; margin-bottom: 0; -} -.wc-block-coupon-code__input { - margin-top: 0; - flex-grow: 1; -} + .wc-block-coupon-code__input { + margin-top: 0; + flex-grow: 1; + } -.wc-block-coupon-code__button { - height: 48px; - margin-left: $gap; - padding-left: $gap-large; - padding-right: $gap-large; - white-space: nowrap; + .wc-block-coupon-code__button { + height: 48px; + flex-shrink: 0; + margin-left: $gap; + padding-left: $gap-large; + padding-right: $gap-large; + white-space: nowrap; + } } diff --git a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/full-cart/checkout-button/index.js b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/full-cart/checkout-button/index.js index 494c1d3e6b6..91e4c8ede51 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/full-cart/checkout-button/index.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/full-cart/checkout-button/index.js @@ -2,7 +2,7 @@ * External dependencies */ import { __ } from '@wordpress/i18n'; -import Button from '@woocommerce/base-components/button'; +import { Button } from '@woocommerce/base-components/cart-checkout'; import { CHECKOUT_URL } from '@woocommerce/block-settings'; /** diff --git a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/block.js b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/block.js index 38b70e164f8..7f754bbbec9 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/block.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/block.js @@ -92,7 +92,7 @@ const Block = ( { return ( - +