laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
33 lines (23 loc) • 622 B
Markdown
# InterruptPrompt
## Overview
Animated prompt that appears to allow interrupting an action (e.g., hitting Enter twice). Built with Framer Motion.
## Props
| Prop | Type | Description |
| --- | --- | --- |
| `isOpen` | `boolean` | Whether the prompt is visible |
| `close` | `() => void` | Close handler |
## Example
```tsx
import { useState } from "react";
import { InterruptPrompt } from "laif-ds";
export function Demo() {
const [open, setOpen] = useState(true);
return (
<div className="relative h-32">
<InterruptPrompt isOpen={open} close={() => setOpen(false)} />
</div>
);
}
```