Raw
1 import { ComponentExample } from "@/components/ComponentExample"
2 import { ComponentReference } from "@/components/ComponentReference"
3
4 export const metadata = {
5 title: `Alert`,
6 }
7
8 # {metadata.title}
9
10 A component for displaying important messages.
11
12 In this guide, you'll learn how to use the Alert component.
13
14 <ComponentExample name="alert-demo" />
15
16 ---
17
18 ## Usage
19
20 ```tsx
21 import { Alert } from "@medusajs/ui"
22 ```
23
24 ```tsx
25 <Alert>Here's a message</Alert>
26 ```
27
28 ---
29
30 ## API Reference
31
32 <ComponentReference mainComponent="Alert" />
33
34 ---
35
36 ## Examples
37
38 ### Success Alert
39
40 <ComponentExample name="alert-success" />
41
42 ### Warning Alert
43
44 <ComponentExample name="alert-warning" />
45
46 ### Error Alert
47
48 <ComponentExample name="alert-error" />
49
50 ### Dismissible Alert
51
52 <ComponentExample name="alert-dismissable" hideFeedback />
53