Functions
[useGiftOptions(props)] ⇒ [GiftOptionsTalonProps]
This talon contains the logic for a gift options component. It performs effects and returns a data object containing values for rendering the component.
This talon performs the following effects:
- Fetch the gift options associated with the cart
- Update the GiftOptionsTalonProps values with the data returned by the query
Typedefs
[GiftOptionsTalonProps] : Object
Props data to use when rendering a gift options component.
[GiftOptionsOperations] : Object
This is a type used by the useGiftOptions talon.
This talon contains the logic for a gift options component. It performs effects and returns a data object containing values for rendering the component.
This talon performs the following effects:
- Fetch the gift options associated with the cart
- Update the GiftOptionsTalonProps values with the data returned by the query
Returns: Parameters
ObjectGiftOptionsOperationsExample (Importing into your project)
import { useGiftOptions } from '@magento/peregrine/lib/talons/CartPage/GiftOptions/useGiftOptions';
Props data to use when rendering a gift options component.
Properties
BooleanObjectArrayObjectincludeGiftReceipt checkbox element.ObjectincludePrintedCard checkbox element.ObjectObjectincludeGiftMessage checkbox element.ObjectBooleanBooleanObjectcardTo text input element.ObjectcardFrom text input element.ObjectcardMessage textarea element.ObjectObjectObjectObjectThis is a type used by the useGiftOptions talon.
Properties
GraphQLASTGraphQLASTSource Code: pwa-studio/packages/peregrine/lib/talons/CartPage/PriceAdjustments/GiftOptions/useGiftOptions.js