diff --git a/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/block.tsx b/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/block.tsx index 4038780d0ee..d00afbfa8b4 100644 --- a/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/block.tsx +++ b/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/block.tsx @@ -10,6 +10,7 @@ import { useColorProps } from '@woocommerce/base-hooks'; * Internal dependencies */ import { defaultCartButtonLabel } from './constants'; +import { getVariant } from '../utils'; type MiniCartCartButtonBlockProps = { cartButtonLabel: string; @@ -28,10 +29,6 @@ const Block = ( { return null; } - const variant = className.includes( 'is-style-fill' ) - ? 'contained' - : 'outlined'; - return ( diff --git a/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/edit.tsx b/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/edit.tsx index 33cd4d64b56..e85e93a2bf3 100644 --- a/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/edit.tsx +++ b/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-cart-button-block/edit.tsx @@ -8,6 +8,7 @@ import EditableButton from '@woocommerce/editor-components/editable-button'; * Internal dependencies */ import { defaultCartButtonLabel } from './constants'; +import { getVariant } from '../utils'; export const Edit = ( { attributes, @@ -21,15 +22,11 @@ export const Edit = ( { const blockProps = useBlockProps(); const { cartButtonLabel } = attributes; - const variant = blockProps.className.includes( 'is-style-fill' ) - ? 'contained' - : 'outlined'; - return ( { diff --git a/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-checkout-button-block/block.tsx b/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-checkout-button-block/block.tsx index 564ec15b7dc..251bbef6bc8 100644 --- a/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-checkout-button-block/block.tsx +++ b/assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/mini-cart-checkout-button-block/block.tsx @@ -10,6 +10,7 @@ import { useColorProps } from '@woocommerce/base-hooks'; * Internal dependencies */ import { defaultCheckoutButtonLabel } from './constants'; +import { getVariant } from '../utils'; type MiniCartCheckoutButtonBlockProps = { checkoutButtonLabel: string; @@ -28,10 +29,6 @@ const Block = ( { return null; } - const variant = className.includes( 'is-style-outline' ) - ? 'outlined' - : 'contained'; - return (