UNPKG

@open-tender/utils

Version:

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

12 lines (11 loc) 576 B
/// <reference types="react" /> import { OrderRating } from '@open-tender/types'; export declare const useOrderRatingForm: (orderId: number | string, orderRating: OrderRating | null, updateRating: (orderId: number | string, data: OrderRating) => void, callback?: () => void) => { submitRef: import("react").MutableRefObject<HTMLButtonElement | null>; stars: number[]; rating: number; handleRating: (star: number) => void; comments: string; handleComments: (value: string) => void; handleSubmit: (evt?: React.FormEvent<HTMLFormElement>) => void; };