Review, edit, approve, or reject an AI-proposed action.
import { InlineApproval } from '@vrum/ui';
<InlineApproval
title={"Send a project update"}
description={"Review the message before sending it to your team."}
payload={{"subject":"Project update","message":"Four milestones are complete."}}
status={"pending"}
defaultEditing={false}
/>Copy code| Prop | Type | Default | Description |
|---|---|---|---|
title* | string | none | Heading shown above the content. |
description | string | none | Supporting text. |
payload | string | Record<string, unknown> | none | payload configuration. |
status | "pending" | ApprovalDecision | "pending" | Current activity or availability state. |
onDecision | ((decision: ApprovalDecision, payload: string | Record<string, unknown> | undefined) => void) | none | on decision configuration. |
defaultEditing | boolean | false | default editing configuration. |
labels | { approve?: string; reject?: string; edit?: string; cancel?: string; } | none | labels configuration. |
defaultChecked | boolean | none | default checked configuration. |
defaultValue | string | number | readonly string[] | none | Initial value for an uncontrolled component. |
autoFocus | boolean | none | auto focus configuration. |
className | string | none | Additional CSS classes. |
id | string | none | id configuration. |
style | CSSProperties | none | Inline style overrides. |
aria-invalid | boolean | "false" | "true" | "grammar" | "spelling" | none | Indicates the entered value does not conform to the format expected by the application. |
aria-label | string | none | Defines a string value that labels the current element. |
children | ReactNode | none | Content rendered inside the component. |
onFocus | FocusEventHandler<HTMLDivElement> | none | on focus configuration. |
onBlur | FocusEventHandler<HTMLDivElement> | none | on blur configuration. |
onChange | ChangeEventHandler<HTMLDivElement, Element> | none | Called when the input value changes. |
onSubmit | SubmitEventHandler<HTMLDivElement> | none | Called when the form is submitted. |
onKeyDown | KeyboardEventHandler<HTMLDivElement> | none | on key down configuration. |
onClick | MouseEventHandler<HTMLDivElement> | none | Called when the control is activated. |
onSelect | ReactEventHandler<HTMLDivElement> | none | on select configuration. |
Review the message before sending it to your team.
{
"subject": "Project update",
"message": "Four milestones are complete."
}