Function: TurnFeedback()¶
TurnFeedback(
__namedParameters):Element|null
Defined in: src/feedback/TurnFeedback.tsx:45
A minimal thumbs up / thumbs down control for one turn, designed for the
KabooSlots.turnFooter slot. Thumbs down opens an optional comment
box before submitting. All storage flows through the host's onFeedback.
Parameters¶
__namedParameters¶
Returns¶
Element | null
Example¶
import { KabooProvider, TurnFeedback } from "@pgege/kaboo-react";
function slots() {
return {
turnFooter: (ctx: { groups: Parameters<typeof TurnFeedback>[0]["groups"] }) => (
<TurnFeedback
groups={ctx.groups}
onFeedback={(p) =>
fetch("/api/feedback", { method: "POST", body: JSON.stringify(p) })
}
/>
),
};
}