{ product.name }
{ showDesc && (
Black cotton top with matching striped skirt. \n',
} }
/>
) }
{ showPrice && (
) }
setAttributes( { linkText: value } ) }
formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
className="wp-block-button__link"
keepPlaceholderOnFocus
/>
) : (
{ ! loaded ? (
) : (
__( 'No product is selected.', 'woo-gutenberg-products-block' )
) }
) }
) }
);
}
}
FeaturedProduct.propTypes = {
/**
* The attributes for this block
*/
attributes: PropTypes.object.isRequired,
/**
* The register block name.
*/
name: PropTypes.string.isRequired,
/**
* A callback to update attributes
*/
setAttributes: PropTypes.func.isRequired,
// from withColors
overlayColor: PropTypes.object,
setOverlayColor: PropTypes.func.isRequired,
// from withSpokenMessages
debouncedSpeak: PropTypes.func.isRequired,
};
export default compose( [
withColors( { overlayColor: 'background-color' } ),
withSpokenMessages,
] )( FeaturedProduct );