woocommerce/plugins/woocommerce-blocks/assets/js/base/components/button
Saad Tarhi d53551d4a7 Fix/cart button focus hover states (https://github.com/woocommerce/woocommerce-blocks/pull/5712)
* Add hover & focus styles for component buttons

We are using an old version of the "@wordpress/component" package,
that's why we are not getting the latest style fixes from Gutenberg.

The reason to not using the latest version is that we had some issues
with the bundle size.

The current solution is to set our own focus & hover styles

* Replace raw value with Sass variable

* Fix hover style for the mini cart block

We don't have the outlined button yet. This styles is unique for the
mini cart button.

To refactor this code, maybe we should create a reusable outlined button

* Add variant to the Woo Block Button component

To refactor our code, adding a "variant" prop looks logical since we are
have already "contained" & "outlined" buttons. So, for future need for an
outlined button, no need to manually apply the same style again.

The "contained" variant is set by default for legacy reasons. Our Button
component was first built as a contained one.

* Fix height difference: oulined & contained buttons

The outlined buttons have more height because of the added border value.

To fix it we can replace the border with the inner shadow.

Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
2022-02-09 18:32:05 +01:00
..
stories Add stories for Button component woocommerce/woocommerce-blocks#5250 (https://github.com/woocommerce/woocommerce-blocks/pull/5706) 2022-02-03 13:29:06 +01:00
index.tsx Fix/cart button focus hover states (https://github.com/woocommerce/woocommerce-blocks/pull/5712) 2022-02-09 18:32:05 +01:00
style.scss Fix/cart button focus hover states (https://github.com/woocommerce/woocommerce-blocks/pull/5712) 2022-02-09 18:32:05 +01:00