diff --git a/localtypings/pxtarget.d.ts b/localtypings/pxtarget.d.ts index fec248589049..362e0a6680b6 100644 --- a/localtypings/pxtarget.d.ts +++ b/localtypings/pxtarget.d.ts @@ -1354,6 +1354,7 @@ declare namespace pxt.tour { steps: BubbleStep[]; showConfetti?: boolean; numberFinalStep?: boolean; // The last step will only be included in the step count if this is true. + footer?: string | JSX.Element; } const enum BubbleLocation { Above, diff --git a/react-common/components/controls/AIFooter.tsx b/react-common/components/controls/AIFooter.tsx new file mode 100644 index 000000000000..ac6258544fe0 --- /dev/null +++ b/react-common/components/controls/AIFooter.tsx @@ -0,0 +1,24 @@ +import { classList } from "../util"; +import { ThumbsFeedback } from "./Feedback/ThumbsFeedback"; + +interface AIFooterProps { + className?: string; // Optional class name to add to the footer + onFeedbackSelected: (positive: boolean | undefined) => void; // Callback function to handle feedback selection +} + +/** + * A component containing a standard AI disclaimer and feedback buttons. + */ +export const AIFooter = (props: AIFooterProps) => { + const { + className, + onFeedbackSelected + } = props; + + return ( +
{targetContent.description}
-