UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

23 lines (22 loc) 1.06 kB
/// <reference types="react" /> import { CartItem, CartLevels, ConfigAccordion } from '@open-tender/types'; export declare const useAccordion: (builtItem: CartItem, toggleOption: (levels: CartLevels) => void, cartId?: number | null, config?: ConfigAccordion) => { open: string | null; setOpen: import("react").Dispatch<import("react").SetStateAction<string | null>>; groups: import("@open-tender/types").CartItemGroups; ingredients: string | null; totalCals: number | null; madeFor: string | null; notes: string | null; hasMadeFor: boolean; hasNotes: boolean; hasInstructions: boolean; hasCals: boolean; nutritionalInfo: import("@open-tender/types").NutritionalInfo | null; hasIngredients: boolean; instructionsTitle: string; sizeGroup: import("@open-tender/types").CartItemGroup | null | undefined; selectedSize: import("@open-tender/types").CartItemOption | null | undefined; showAccordion: boolean | import("@open-tender/types").CartItemGroup; toggleSize: (optionId: number) => void; };