Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

667 B
Raw Blame
import { withPublicComponentWrapper } from "embedding-sdk-bundle/components/private/PublicComponentWrapper";

import {
  InteractiveQuestion,
  type InteractiveQuestionBaseProps,
} from "../InteractiveQuestion";

/**
 * @interface
 * @expand
 * @category CreateQuestion
 */
export type CreateQuestionProps = Omit<
  Partial<InteractiveQuestionBaseProps>,
  "children"
>;

const CreateQuestionInner = (props: CreateQuestionProps) => (
  <InteractiveQuestion {...props} questionId="new" />
);

// Unjustified type cast. FIXME
export const CreateQuestion = withPublicComponentWrapper(CreateQuestionInner, {
  supportsGuestEmbed: false,
}) as typeof CreateQuestionInner;