|
1
|
import { ComponentExample } from "@/components/ComponentExample" |
|
2
|
import { ComponentReference } from "@/components/ComponentReference" |
|
3
|
|
|
4
|
export const metadata = { |
|
5
|
title: `Button`, |
|
6
|
} |
|
7
|
|
|
8
|
# {metadata.title} |
|
9
|
|
|
10
|
A component for rendering buttons using Medusa's design system. |
|
11
|
|
|
12
|
In this guide, you'll learn how to use the Button component. |
|
13
|
|
|
14
|
<ComponentExample name="button-demo" /> |
|
15
|
|
|
16
|
--- |
|
17
|
|
|
18
|
## Usage |
|
19
|
|
|
20
|
```tsx |
|
21
|
import { Button } from "@medusajs/ui" |
|
22
|
``` |
|
23
|
|
|
24
|
```tsx |
|
25
|
<Button>Button</Button> |
|
26
|
``` |
|
27
|
|
|
28
|
--- |
|
29
|
|
|
30
|
## API Reference |
|
31
|
|
|
32
|
<ComponentReference mainComponent="Button" /> |
|
33
|
|
|
34
|
--- |
|
35
|
|
|
36
|
## Examples |
|
37
|
|
|
38
|
### Button Variants |
|
39
|
|
|
40
|
<ComponentExample name="button-all-variants" /> |
|
41
|
|
|
42
|
### Button Sizes |
|
43
|
|
|
44
|
<ComponentExample name="button-all-sizes" /> |
|
45
|
|
|
46
|
### Button Loading State |
|
47
|
|
|
48
|
<ComponentExample name="button-loading" /> |
|
49
|
|
|
50
|
### Button with Icon |
|
51
|
|
|
52
|
<ComponentExample name="button-with-icon" /> |
|
53
|
|
|
54
|
### Button as Link |
|
55
|
|
|
56
|
<ComponentExample name="button-as-link" hideFeedback /> |