Project approval
Project lifecycle controls with a Draft → Submitted → Approved → Completed status track, confirm dialogs that spring the fill forward, a reject shake that drains it back, a confetti pop on completion and a comments sheet.
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
import { ProjectApproval } from '@/components/component-kit/items/block-project-approval';
export function Example() { return <ProjectApproval onStatusChange={(from, to) => console.log(from, to)} />;}Props
| Prop | Type | Default | Description |
|---|---|---|---|
project | ApprovalProject | built-in demo project | Title, owner ({ name, initials }), initial status and comments. |
defaultStatus | "draft" | "submitted" | "approved" | "completed" | project.status | Overrides the project's status for the initial render. |
onStatusChange | (from: ProjectStatus, to: ProjectStatus, reason?: string) => void | undefined | Called on every transition, with the dialog note or rejection reason when one was given. |
compact | boolean | false | Track plus a single action button, for small previews. |
autoPlay | boolean | compact | Idle loop that walks the track every 1.8s and wraps to Draft. |
contentClassName | string | undefined | Class for the portalled confirm dialog and comments sheet. |