Docs
Render Prompt

Render Prompt

Renders UI based on a prompt or query.

Installation

Usage

import { RenderPrompt } from "@/components/ui/render-prompt";
<RenderPrompt
  open={isOpen}
  title="Confirm Action"
  description="Are you sure you want to perform this action?"
  confirmText="Confirm"
  cancelText="Cancel"
  onConfirm={() => handleConfirm()}
  onCancel={() => handleCancel()}
/>

Props

PropTypeDefaultDescription
openboolean-Controls the visibility of the prompt dialog.
titlestring-The title displayed in the prompt.
descriptionstring-The description text shown in the prompt.
verificationTextstring-Optional text the user must enter to confirm action.
confirmTextstringConfirmThe label for the confirm button.
cancelTextstringCancelThe label for the cancel button.
onConfirmfunction-Callback function when the action is confirmed.
onCancelfunction-Callback function when the action is cancelled.