Make the start shopping button show the theme style (https://github.com/woocommerce/woocommerce-blocks/pull/8567)
* Make the start shopping button show the theme style * Center the button * Fix test
This commit is contained in:
parent
1d0adeed28
commit
7245ca519e
|
@ -2,6 +2,7 @@
|
|||
* External dependencies
|
||||
*/
|
||||
import { SHOP_URL } from '@woocommerce/block-settings';
|
||||
import Button from '@woocommerce/base-components/button';
|
||||
import classNames from 'classnames';
|
||||
|
||||
/**
|
||||
|
@ -23,15 +24,16 @@ const Block = ( {
|
|||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={ classNames(
|
||||
className,
|
||||
'wc-block-mini-cart__shopping-button'
|
||||
) }
|
||||
>
|
||||
<a href={ SHOP_URL }>
|
||||
<div className="wp-block-button has-text-align-center">
|
||||
<Button
|
||||
className={ classNames(
|
||||
className,
|
||||
'wc-block-mini-cart__shopping-button'
|
||||
) }
|
||||
href={ SHOP_URL }
|
||||
>
|
||||
{ startShoppingButtonLabel || defaultStartShoppingButtonLabel }
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -191,7 +191,7 @@ describe( 'Shopper → Mini Cart', () => {
|
|||
);
|
||||
|
||||
const shopLink = await page.$eval(
|
||||
'.wc-block-mini-cart__shopping-button a',
|
||||
'a.wc-block-mini-cart__shopping-button',
|
||||
( el ) => el.href
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue