import React, { FC } from 'react'; import { ButtonProps } from '../Button'; /** * @interface IAddToCartButtonProps * @property {ButtonProps} buttonProps - props that applicable to Button component; * * @property {function} onClick - this callback is fired when a user clicks on * Try before you Buy button. Should be used to * modify a storefront cart by adding the item to cart and setting this item with * `isTBYB` flag set to true when updating a Blackcart cart via * setCart method provided from useBlackcart hook. * * If instantCheckout is provided this callback can be waived, but it's recommended to * provide it. In case cart is invalid for TBYB experience this method will be called to * handle it on a storefront. * * @property {boolean} fullWidth - Default to false. the component will take full width of its * parent container. Button will share this property if provided. * * @property {string} featureName - Default to Try before you buy. Can be customized * if set. * * @property {function} onLearnMoreClick - Optional. If useModal set in BlackcartProvider * the Javascript Info Modal will be shown. Otherwise, this callback is called * whenever a user clicks on Learn more about {featureName} link. * * @property {boolean} hideInfoCaption - Default to false. if set to true Learn more * caption will be hidden. * */ interface IAddToCartButtonProps extends Omit, 'children' | 'onClick'> { buttonProps: ButtonProps; onClick: (event: React.MouseEvent) => void; hideInfoCaption?: boolean; fullWidth?: boolean; featureName?: string; onLearnMoreClick?: (event: React.MouseEvent) => void; } declare const AddToCartButton: FC; export { AddToCartButton };