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
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | - | Controls the visibility of the prompt dialog. |
title | string | - | The title displayed in the prompt. |
description | string | - | The description text shown in the prompt. |
verificationText | string | - | Optional text the user must enter to confirm action. |
confirmText | string | Confirm | The label for the confirm button. |
cancelText | string | Cancel | The label for the cancel button. |
onConfirm | function | - | Callback function when the action is confirmed. |
onCancel | function | - | Callback function when the action is cancelled. |