diff --git a/assets/js/blocks/mini-cart/block.tsx b/assets/js/blocks/mini-cart/block.tsx index 88773d4aa46..43f7d0e7ca6 100644 --- a/assets/js/blocks/mini-cart/block.tsx +++ b/assets/js/blocks/mini-cart/block.tsx @@ -34,6 +34,7 @@ import QuantityBadge from './quantity-badge'; import { MiniCartContentsBlock } from './mini-cart-contents/block'; import './style.scss'; import { blockName } from './mini-cart-contents/attributes'; +import { useTypographyProps } from '../../hooks/style-attributes'; interface Props { isInitiallyOpen?: boolean; @@ -44,14 +45,16 @@ interface Props { hasHiddenPrice: boolean; } -const MiniCartBlock = ( { - isInitiallyOpen = false, - colorClassNames, - style, - contents = '', - addToCartBehaviour = 'none', - hasHiddenPrice = false, -}: Props ): JSX.Element => { +const MiniCartBlock = ( attributes: Props ): JSX.Element => { + const { + isInitiallyOpen = false, + colorClassNames, + style, + contents = '', + addToCartBehaviour = 'none', + hasHiddenPrice = false, + } = attributes; + const { cartItemsCount: cartItemsCountFromApi, cartIsLoading, @@ -201,6 +204,8 @@ const MiniCartBlock = ( { color: style?.color?.text, }; + const typographyProps = useTypographyProps( attributes ); + return ( <>