gladvn 0.2.36 → 0.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/scripts/strip-comments.ts +79 -0
- package/src/blocks/auth-form.tsx +34 -30
- package/src/blocks/auth-recovery.tsx +9 -13
- package/src/blocks/auth-split.tsx +46 -36
- package/src/blocks/settings.tsx +84 -117
- package/src/components/macro/alert-preset.tsx +3 -1
- package/src/components/macro/carousel-preset.tsx +0 -1
- package/src/components/macro/checkbox-preset.test.tsx +2 -2
- package/src/components/macro/checkbox-preset.tsx +1 -2
- package/src/components/macro/command-preset.tsx +1 -1
- package/src/components/macro/date-picker.tsx +5 -18
- package/src/components/macro/dialog-preset.tsx +5 -3
- package/src/components/macro/input-preset.tsx +0 -1
- package/src/components/macro/select-preset.tsx +1 -1
- package/src/components/macro/switch-preset.test.tsx +1 -1
- package/src/components/micro/accordion.test.tsx +6 -12
- package/src/components/micro/alert-dialog.tsx +0 -2
- package/src/components/micro/alert.test.tsx +5 -8
- package/src/components/micro/alert.tsx +0 -2
- package/src/components/micro/badge.test.tsx +5 -7
- package/src/components/micro/badge.tsx +1 -3
- package/src/components/micro/button.test.tsx +19 -26
- package/src/components/micro/button.tsx +3 -11
- package/src/components/micro/calendar.tsx +12 -13
- package/src/components/micro/card.test.tsx +3 -5
- package/src/components/micro/carousel.tsx +0 -1
- package/src/components/micro/chart.tsx +3 -2
- package/src/components/micro/checkbox.test.tsx +9 -18
- package/src/components/micro/combobox.tsx +1 -3
- package/src/components/micro/command.tsx +23 -11
- package/src/components/micro/context-menu.tsx +0 -2
- package/src/components/micro/dialog.test.tsx +6 -14
- package/src/components/micro/dialog.tsx +0 -2
- package/src/components/micro/drawer.tsx +0 -3
- package/src/components/micro/dropdown-menu.test.tsx +8 -14
- package/src/components/micro/dropdown-menu.tsx +0 -2
- package/src/components/micro/field.tsx +3 -3
- package/src/components/micro/hover-card.tsx +0 -2
- package/src/components/micro/input-group.tsx +9 -42
- package/src/components/micro/input.test.tsx +15 -24
- package/src/components/micro/navigation-menu.tsx +0 -2
- package/src/components/micro/popover.test.tsx +5 -9
- package/src/components/micro/progress.tsx +5 -1
- package/src/components/micro/select.test.tsx +5 -18
- package/src/components/micro/select.tsx +3 -5
- package/src/components/micro/separator.tsx +1 -1
- package/src/components/micro/sheet.test.tsx +6 -14
- package/src/components/micro/sheet.tsx +0 -2
- package/src/components/micro/sidebar.tsx +5 -6
- package/src/components/micro/sonner.tsx +0 -1
- package/src/components/micro/switch.test.tsx +9 -18
- package/src/components/micro/switch.tsx +1 -1
- package/src/components/micro/tabs.test.tsx +5 -11
- package/src/components/micro/theme-provider.tsx +0 -12
- package/src/components/micro/toggle-group.tsx +1 -12
- package/src/components/micro/tooltip.test.tsx +7 -12
- package/src/dev/App.tsx +6 -6
- package/src/dev/components/BlockViewer.tsx +15 -4
- package/src/dev/components/Container.tsx +20 -0
- package/src/dev/components/GladvnLogo.tsx +3 -9
- package/src/dev/components/code-highlighter.tsx +5 -3
- package/src/dev/components/showcase.tsx +116 -168
- package/src/dev/sections/buttons.tsx +4 -9
- package/src/dev/sections/display.tsx +68 -72
- package/src/dev/sections/feedback.tsx +304 -314
- package/src/dev/sections/forms.tsx +10 -14
- package/src/dev/sections/interactive.tsx +32 -32
- package/src/dev/sections/overview.tsx +2 -10
- package/src/dev/showcase/accordion.tsx +512 -554
- package/src/dev/showcase/alert-dialog.tsx +525 -565
- package/src/dev/showcase/alert.tsx +352 -402
- package/src/dev/showcase/aspect-ratio.tsx +167 -193
- package/src/dev/showcase/avatar.tsx +231 -269
- package/src/dev/showcase/badge.tsx +92 -140
- package/src/dev/showcase/breadcrumb.tsx +113 -135
- package/src/dev/showcase/button.tsx +140 -173
- package/src/dev/showcase/calendar.tsx +187 -237
- package/src/dev/showcase/card.tsx +229 -261
- package/src/dev/showcase/carousel.tsx +288 -315
- package/src/dev/showcase/chart.tsx +44 -50
- package/src/dev/showcase/checkbox.tsx +286 -330
- package/src/dev/showcase/collapsible.tsx +143 -160
- package/src/dev/showcase/combobox.tsx +327 -369
- package/src/dev/showcase/command.tsx +106 -120
- package/src/dev/showcase/context-menu.tsx +93 -107
- package/src/dev/showcase/dialog.tsx +585 -630
- package/src/dev/showcase/drawer.tsx +176 -196
- package/src/dev/showcase/dropdown-menu.tsx +183 -201
- package/src/dev/showcase/empty.tsx +232 -274
- package/src/dev/showcase/hover-card.tsx +153 -180
- package/src/dev/showcase/input-group.tsx +221 -253
- package/src/dev/showcase/input-otp.tsx +204 -250
- package/src/dev/showcase/input.tsx +246 -325
- package/src/dev/showcase/item.tsx +134 -152
- package/src/dev/showcase/kbd.tsx +149 -172
- package/src/dev/showcase/label.tsx +50 -68
- package/src/dev/showcase/menubar.tsx +194 -213
- package/src/dev/showcase/navigation-menu.tsx +119 -133
- package/src/dev/showcase/overview-components/ArchitectureSection.tsx +126 -0
- package/src/dev/showcase/overview-components/CodeBlock.tsx +50 -0
- package/src/dev/showcase/overview-components/ColorPaletteSection.tsx +44 -0
- package/src/dev/showcase/overview-components/DashboardPreview.tsx +159 -0
- package/src/dev/showcase/overview-components/FeatureGridSection.tsx +535 -0
- package/src/dev/showcase/overview-components/FooterCTA.tsx +137 -0
- package/src/dev/showcase/overview-components/HeroSection.tsx +65 -0
- package/src/dev/showcase/overview-components/PrinciplesSection.tsx +128 -0
- package/src/dev/showcase/overview.tsx +21 -1163
- package/src/dev/showcase/pagination.tsx +144 -190
- package/src/dev/showcase/popover.tsx +181 -196
- package/src/dev/showcase/progress.tsx +141 -189
- package/src/dev/showcase/radio-group.tsx +272 -332
- package/src/dev/showcase/resizable.tsx +119 -141
- package/src/dev/showcase/scroll-area.tsx +21 -36
- package/src/dev/showcase/select.tsx +262 -322
- package/src/dev/showcase/separator.tsx +75 -73
- package/src/dev/showcase/sheet.tsx +333 -361
- package/src/dev/showcase/sidebar.tsx +53 -59
- package/src/dev/showcase/skeleton.tsx +93 -112
- package/src/dev/showcase/slider.tsx +244 -296
- package/src/dev/showcase/sonner.tsx +251 -258
- package/src/dev/showcase/spinner.tsx +46 -67
- package/src/dev/showcase/switch.tsx +298 -362
- package/src/dev/showcase/table.tsx +76 -80
- package/src/dev/showcase/tabs.tsx +302 -355
- package/src/dev/showcase/textarea.tsx +240 -293
- package/src/dev/showcase/toast.tsx +48 -54
- package/src/dev/showcase/toggle-group.tsx +104 -129
- package/src/dev/showcase/toggle.tsx +82 -102
- package/src/dev/showcase/tooltip.tsx +173 -192
- package/src/dev/showcase/why.tsx +6 -12
- package/src/hooks/use-mobile.test.ts +3 -2
- package/src/lib/utils.test.ts +5 -4
|
@@ -8,7 +8,7 @@ import { useDevContext } from "../../dev/components/dev-context";
|
|
|
8
8
|
import {
|
|
9
9
|
DocsP,
|
|
10
10
|
ExampleGrid,
|
|
11
|
-
|
|
11
|
+
ShowcaseExample,
|
|
12
12
|
Showcase,
|
|
13
13
|
ShowcaseDocs
|
|
14
14
|
} from "../../dev/components/showcase";
|
|
@@ -29,39 +29,31 @@ function ButtonMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<div className="space-y-10
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
label="Variants"
|
|
36
|
-
description="Tất cả các kiểu hiển thị hiện có."
|
|
37
|
-
codeString={`<Button variant="solid">Solid</Button>
|
|
32
|
+
<div className="space-y-10">
|
|
33
|
+
<ShowcaseExample title="Variants" description="Tất cả các kiểu hiển thị hiện có." code={`<div className="flex flex-wrap items-center gap-4">
|
|
34
|
+
<Button variant="solid">Solid</Button>
|
|
38
35
|
<Button variant="outline">Outline</Button>
|
|
39
36
|
<Button variant="soft">Soft</Button>
|
|
40
37
|
<Button variant="ghost">Ghost</Button>
|
|
41
|
-
<Button variant="link">Link</Button
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</Button>
|
|
58
|
-
</ExampleSection>
|
|
38
|
+
<Button variant="link">Link</Button>
|
|
39
|
+
</div>`} preview={
|
|
40
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
41
|
+
<Button size={globalSize} variant="solid">
|
|
42
|
+
Solid
|
|
43
|
+
</Button><Button size={globalSize} variant="outline">
|
|
44
|
+
Outline
|
|
45
|
+
</Button><Button size={globalSize} variant="soft">
|
|
46
|
+
Soft
|
|
47
|
+
</Button><Button size={globalSize} variant="ghost">
|
|
48
|
+
Ghost
|
|
49
|
+
</Button><Button size={globalSize} variant="link">
|
|
50
|
+
Link
|
|
51
|
+
</Button>
|
|
52
|
+
</div>
|
|
53
|
+
} />
|
|
59
54
|
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
label="Colors"
|
|
63
|
-
description="Các màu semantic đi kèm variant solid."
|
|
64
|
-
codeString={`<Button color="primary">Primary</Button>
|
|
55
|
+
<ShowcaseExample title="Colors" description="Các màu semantic đi kèm variant solid." code={`<div className="flex flex-wrap items-center gap-4">
|
|
56
|
+
<Button color="primary">Primary</Button>
|
|
65
57
|
<Button color="secondary">Secondary</Button>
|
|
66
58
|
<Button color="destructive">Destructive</Button>
|
|
67
59
|
<Button color="warning">Warning</Button>
|
|
@@ -69,65 +61,55 @@ function ButtonMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
69
61
|
<Button color="info">Info</Button>
|
|
70
62
|
<Button color="tertiary">Tertiary</Button>
|
|
71
63
|
<Button color="muted">Muted</Button>
|
|
72
|
-
<Button color="accent">Accent</Button
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Muted
|
|
97
|
-
</Button>
|
|
98
|
-
<Button size={globalSize} color="accent">
|
|
99
|
-
Accent
|
|
100
|
-
</Button>
|
|
101
|
-
</ExampleSection>
|
|
64
|
+
<Button color="accent">Accent</Button>
|
|
65
|
+
</div>`} preview={
|
|
66
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
67
|
+
<Button size={globalSize} color="primary">
|
|
68
|
+
Primary
|
|
69
|
+
</Button><Button size={globalSize} color="secondary">
|
|
70
|
+
Secondary
|
|
71
|
+
</Button><Button size={globalSize} color="destructive">
|
|
72
|
+
Destructive
|
|
73
|
+
</Button><Button size={globalSize} color="warning">
|
|
74
|
+
Warning
|
|
75
|
+
</Button><Button size={globalSize} color="success">
|
|
76
|
+
Success
|
|
77
|
+
</Button><Button size={globalSize} color="info">
|
|
78
|
+
Info
|
|
79
|
+
</Button><Button size={globalSize} color="tertiary">
|
|
80
|
+
Tertiary
|
|
81
|
+
</Button><Button size={globalSize} color="muted">
|
|
82
|
+
Muted
|
|
83
|
+
</Button><Button size={globalSize} color="accent">
|
|
84
|
+
Accent
|
|
85
|
+
</Button>
|
|
86
|
+
</div>
|
|
87
|
+
} />
|
|
102
88
|
|
|
103
|
-
{/* ── With Icon ── */}
|
|
104
89
|
<ExampleGrid>
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
description="Button kèm icon ở đầu hoặc cuối."
|
|
108
|
-
codeString={`<Button variant="outline">
|
|
90
|
+
<ShowcaseExample title="With Icon" description="Button kèm icon ở đầu hoặc cuối." code={`<div className="flex flex-wrap items-center gap-4">
|
|
91
|
+
<Button variant="outline">
|
|
109
92
|
<ButtonIcon render={<MailIcon />} />
|
|
110
93
|
Login with Email
|
|
111
94
|
</Button>
|
|
112
95
|
<Button>
|
|
113
96
|
<ButtonIcon render={<DownloadIcon />} />
|
|
114
97
|
Download
|
|
115
|
-
</Button
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
98
|
+
</Button>
|
|
99
|
+
</div>`} preview={
|
|
100
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
101
|
+
<Button size={globalSize} variant="outline">
|
|
102
|
+
<ButtonIcon render={<MailIcon />} />
|
|
103
|
+
Login with Email
|
|
104
|
+
</Button><Button size={globalSize}>
|
|
105
|
+
<ButtonIcon render={<DownloadIcon />} />
|
|
106
|
+
Download
|
|
107
|
+
</Button>
|
|
108
|
+
</div>
|
|
109
|
+
} />
|
|
126
110
|
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
description="Button vuông chỉ chứa icon."
|
|
130
|
-
codeString={`<Button variant="outline" iconOnly={true}>
|
|
111
|
+
<ShowcaseExample title="Icon Only" description="Button vuông chỉ chứa icon." code={`<div className="flex flex-wrap items-center gap-4">
|
|
112
|
+
<Button variant="outline" iconOnly={true}>
|
|
131
113
|
<ButtonIcon render={<PlusIcon />} />
|
|
132
114
|
</Button>
|
|
133
115
|
<Button variant="ghost" iconOnly={true}>
|
|
@@ -135,25 +117,22 @@ function ButtonMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
135
117
|
</Button>
|
|
136
118
|
<Button variant="soft" iconOnly={true}>
|
|
137
119
|
<ButtonIcon render={<DownloadIcon />} />
|
|
138
|
-
</Button
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
120
|
+
</Button>
|
|
121
|
+
</div>`} preview={
|
|
122
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
123
|
+
<Button size={globalSize} variant="outline" iconOnly={true}>
|
|
124
|
+
<ButtonIcon render={<PlusIcon />} />
|
|
125
|
+
</Button><Button size={globalSize} variant="ghost" iconOnly={true}>
|
|
126
|
+
<ButtonIcon render={<MailIcon />} />
|
|
127
|
+
</Button><Button size={globalSize} variant="soft" iconOnly={true}>
|
|
128
|
+
<ButtonIcon render={<DownloadIcon />} />
|
|
129
|
+
</Button>
|
|
130
|
+
</div>
|
|
131
|
+
} />
|
|
150
132
|
</ExampleGrid>
|
|
151
133
|
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
label="Disabled"
|
|
155
|
-
description="Button không thể tương tác, hiển thị mờ."
|
|
156
|
-
codeString={`<Button disabled>Solid Disabled</Button>
|
|
134
|
+
<ShowcaseExample title="Disabled" description="Button không thể tương tác, hiển thị mờ." code={`<div className="flex flex-wrap items-center gap-4">
|
|
135
|
+
<Button disabled>Solid Disabled</Button>
|
|
157
136
|
<Button variant="outline" disabled>
|
|
158
137
|
Outline Disabled
|
|
159
138
|
</Button>
|
|
@@ -165,32 +144,26 @@ function ButtonMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
165
144
|
</Button>
|
|
166
145
|
<Button variant="link" disabled>
|
|
167
146
|
Link Disabled
|
|
168
|
-
</Button
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
</Button>
|
|
185
|
-
</ExampleSection>
|
|
147
|
+
</Button>
|
|
148
|
+
</div>`} preview={
|
|
149
|
+
<div className="flex flex-wrap items-center gap-4">
|
|
150
|
+
<Button size={globalSize} disabled>
|
|
151
|
+
Solid Disabled
|
|
152
|
+
</Button><Button size={globalSize} variant="outline" disabled>
|
|
153
|
+
Outline Disabled
|
|
154
|
+
</Button><Button size={globalSize} variant="soft" disabled>
|
|
155
|
+
Soft Disabled
|
|
156
|
+
</Button><Button size={globalSize} variant="ghost" disabled>
|
|
157
|
+
Ghost Disabled
|
|
158
|
+
</Button><Button size={globalSize} variant="link" disabled>
|
|
159
|
+
Link Disabled
|
|
160
|
+
</Button>
|
|
161
|
+
</div>
|
|
162
|
+
} />
|
|
186
163
|
|
|
187
|
-
{/* ── Real-world examples ── */}
|
|
188
164
|
<ExampleGrid>
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
description="Button kèm Spinner khi đang xử lý async."
|
|
192
|
-
fullWidth
|
|
193
|
-
codeString={`<Button
|
|
165
|
+
<ShowcaseExample title="Loading State" description="Button kèm Spinner khi đang xử lý async." code={`<div className="flex flex-col gap-3 w-full max-w-xs mx-auto">
|
|
166
|
+
<Button
|
|
194
167
|
color="primary"
|
|
195
168
|
className="w-full"
|
|
196
169
|
disabled={isSending}
|
|
@@ -201,71 +174,69 @@ function ButtonMicroShowcase({ globalSize }: { globalSize: Size }) {
|
|
|
201
174
|
</Button>
|
|
202
175
|
<Button variant="outline" className="w-full">
|
|
203
176
|
Save Draft
|
|
204
|
-
</Button
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
177
|
+
</Button>
|
|
178
|
+
</div>`} preview={
|
|
179
|
+
<div className="flex flex-col gap-3 w-full max-w-xs mx-auto">
|
|
180
|
+
<Button
|
|
181
|
+
size={globalSize}
|
|
182
|
+
color="primary"
|
|
183
|
+
className="w-full"
|
|
184
|
+
disabled={isSending}
|
|
185
|
+
onClick={handleSend}
|
|
186
|
+
>
|
|
187
|
+
{isSending && <Spinner />}
|
|
188
|
+
{isSending ? "Sending..." : "Send Message"}
|
|
189
|
+
</Button>
|
|
190
|
+
<Button size={globalSize} variant="outline" className="w-full">
|
|
191
|
+
Save Draft
|
|
192
|
+
</Button>
|
|
193
|
+
</div>
|
|
194
|
+
} />
|
|
222
195
|
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
196
|
+
<ShowcaseExample title="Destructive" description="Xác nhận hành động nguy hiểm (xoá dữ liệu, huỷ tài khoản...)." code={`<div className="w-full max-w-xs mx-auto rounded-lg border border-destructive/20 bg-destructive/5 p-4 flex flex-col gap-2">
|
|
197
|
+
<p className="text-sm font-medium">Xoá Workspace</p>
|
|
198
|
+
<p className="text-xs text-muted-foreground">
|
|
199
|
+
Hành động này không thể hoàn tác. Tất cả dữ liệu sẽ bị mất.
|
|
200
|
+
</p>
|
|
201
|
+
<Button
|
|
228
202
|
color="destructive"
|
|
229
203
|
className="w-full mt-1"
|
|
230
204
|
disabled={isDeleting}
|
|
231
205
|
onClick={handleDelete}
|
|
232
206
|
>
|
|
233
207
|
{isDeleting && <Spinner />}
|
|
234
|
-
{isDeleting ? "
|
|
235
|
-
</Button
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
208
|
+
{isDeleting ? "Đang xoá..." : "Xoá Vĩnh viễn"}
|
|
209
|
+
</Button>
|
|
210
|
+
</div>`} preview={
|
|
211
|
+
<div className="w-full max-w-xs mx-auto rounded-lg border border-destructive/20 bg-destructive/5 p-4 flex flex-col gap-2">
|
|
212
|
+
<p className="text-sm font-medium">Xoá Workspace</p>
|
|
213
|
+
<p className="text-xs text-muted-foreground">
|
|
214
|
+
Hành động này không thể hoàn tác. Tất cả dữ liệu sẽ bị mất.
|
|
215
|
+
</p>
|
|
216
|
+
<Button
|
|
217
|
+
size={globalSize}
|
|
218
|
+
color="destructive"
|
|
219
|
+
className="w-full mt-1"
|
|
220
|
+
disabled={isDeleting}
|
|
221
|
+
onClick={handleDelete}
|
|
222
|
+
>
|
|
223
|
+
{isDeleting && <Spinner />}
|
|
224
|
+
{isDeleting ? "Đang xoá..." : "Xoá Vĩnh viễn"}
|
|
225
|
+
</Button>
|
|
226
|
+
</div>
|
|
227
|
+
} />
|
|
254
228
|
</ExampleGrid>
|
|
255
229
|
</div>
|
|
256
230
|
);
|
|
257
231
|
}
|
|
258
232
|
|
|
259
|
-
// ──────────────────────────────────────────────────────────
|
|
260
|
-
// SECTION 3: Entry point
|
|
261
|
-
// ──────────────────────────────────────────────────────────
|
|
262
233
|
export default function ButtonShowcase() {
|
|
263
234
|
const { size: globalSize } = useDevContext();
|
|
264
235
|
return (
|
|
265
236
|
<Showcase
|
|
266
237
|
title="Button"
|
|
267
238
|
description="Kích hoạt hành động hoặc sự kiện — ví dụ: submit form, mở dialog."
|
|
268
|
-
|
|
239
|
+
guideline={
|
|
269
240
|
<ShowcaseDocs>
|
|
270
241
|
<DocsP>
|
|
271
242
|
Thành phần cơ bản để người dùng tương tác. Hỗ trợ nhiều variant, màu
|
|
@@ -274,11 +245,7 @@ export default function ButtonShowcase() {
|
|
|
274
245
|
</DocsP>
|
|
275
246
|
</ShowcaseDocs>
|
|
276
247
|
}
|
|
277
|
-
|
|
278
|
-
{
|
|
279
|
-
label: "Micro (Primitive)",
|
|
280
|
-
content: <ButtonMicroShowcase globalSize={globalSize} /> },
|
|
281
|
-
]}
|
|
248
|
+
micro={{ content: <ButtonMicroShowcase globalSize={globalSize} /> }}
|
|
282
249
|
/>
|
|
283
250
|
);
|
|
284
251
|
}
|