diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/edit.tsx b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/edit.tsx index e8c5c92f8b0..39ed82bfcd0 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/edit.tsx +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/edit.tsx @@ -3,7 +3,9 @@ */ import { useBlockProps } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; -import { Button, Disabled, Notice } from '@wordpress/components'; +import { Button, Disabled, Tooltip } from '@wordpress/components'; +import { Skeleton } from '@woocommerce/base-components/skeleton'; + /** * Internal dependencies */ @@ -19,31 +21,34 @@ const Edit = () => { return (
- - -

- { __( - 'Customers will see product add-to-cart options displayed here, dependent on the product type.', - 'woo-gutenberg-products-block' - ) } -

-
- - -
+ +
+ + + + + +
+
); }; diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/editor.scss b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/editor.scss index c45cef71e54..371171a8eff 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/editor.scss +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/add-to-cart-form/editor.scss @@ -1,15 +1,10 @@ -.wc-block-add-to-cart-form { +.wc-block-editor-add-to-cart-form { display: flex; - flex-direction: row; + flex-direction: column; + row-gap: $default-block-margin; } -.wc-block-add-to-cart-form__notice.components-notice { - margin: 10px 0; - color: $black; - max-width: 60%; -} - -input.wc-block-add-to-cart-form__quantity[type="number"] { +input.wc-block-editor-add-to-cart-form__quantity[type="number"] { max-width: 50px; min-height: 23px; float: left; @@ -28,3 +23,10 @@ button.components-button.wc-block-add-to-cart-form__button { padding: 20px 30px; border-radius: 0; } + +.wc-block-editor-container { + cursor: help; + gap: 10px; + display: flex; + flex-direction: column; +} diff --git a/plugins/woocommerce-blocks/assets/js/base/components/skeleton/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/skeleton/index.tsx new file mode 100644 index 00000000000..6249d108bab --- /dev/null +++ b/plugins/woocommerce-blocks/assets/js/base/components/skeleton/index.tsx @@ -0,0 +1,22 @@ +/** + * Internal dependencies + */ +import './style.scss'; + +export interface SkeletonProps { + numberOfLines?: number; +} + +export const Skeleton = ( { + numberOfLines = 1, +}: SkeletonProps ): JSX.Element => { + const skeletonLines = Array( numberOfLines ).fill( +