@@ -17,71 +17,43 @@ npx @capsuleui/core add Button
1717### Основные варианты
1818
1919<div class =" component-demo " >
20- <capsule-button variant =" primary " >Primary</capsule-button >
21- <capsule-button variant =" secondary " >Secondary</capsule-button >
22- <capsule-button variant =" outline " >Outline</capsule-button >
23- <capsule-button variant =" text " >Text</capsule-button >
20+ <capsule-button variant =" default " >По умолчанию</capsule-button >
21+ <capsule-button variant =" secondary " >Вторичный</capsule-button >
22+ <capsule-button variant =" outline " >Контурный</capsule-button >
23+ <capsule-button variant =" ghost " >Прозрачный</capsule-button >
24+ <capsule-button variant =" link " >Ссылка</capsule-button >
25+ <capsule-button variant =" destructive " >Опасный</capsule-button >
2426</div >
2527
2628``` html
27- <capsule-button variant =" primary" >Primary</capsule-button >
28- <capsule-button variant =" secondary" >Secondary</capsule-button >
29- <capsule-button variant =" outline" >Outline</capsule-button >
30- <capsule-button variant =" text" >Text</capsule-button >
31- ```
32-
33- #### Семантические цвета
34-
35- <div class =" component-demo " >
36- <capsule-button variant =" success " >Success</capsule-button >
37- <capsule-button variant =" error " >Error</capsule-button >
38- <capsule-button variant =" warning " >Warning</capsule-button >
39- <capsule-button variant =" info " >Info</capsule-button >
40- </div >
41-
42- ``` html
43- <capsule-button variant =" success" >Success</capsule-button >
44- <capsule-button variant =" error" >Error</capsule-button >
45- <capsule-button variant =" warning" >Warning</capsule-button >
46- <capsule-button variant =" info" >Info</capsule-button >
29+ <capsule-button variant =" default" >По умолчанию</capsule-button >
30+ <capsule-button variant =" secondary" >Вторичный</capsule-button >
31+ <capsule-button variant =" outline" >Контурный</capsule-button >
32+ <capsule-button variant =" ghost" >Прозрачный</capsule-button >
33+ <capsule-button variant =" link" >Ссылка</capsule-button >
34+ <capsule-button variant =" destructive" >Опасный</capsule-button >
4735```
4836
4937### Размеры
5038
5139<div class =" component-demo " >
52- <capsule-button size =" xs " >Extra Small</capsule-button >
53- <capsule-button size =" sm " >Small</capsule-button >
54- <capsule-button size =" md " >Medium</capsule-button >
55- <capsule-button size =" lg " >Large</capsule-button >
56- </div >
57-
58- ``` html
59- <capsule-button size =" xs" >Extra Small</capsule-button >
60- <capsule-button size =" sm" >Small</capsule-button >
61- <capsule-button size =" md" >Medium</capsule-button >
62- <capsule-button size =" lg" >Large</capsule-button >
63- ```
64-
65- ### Скругления
66-
67- <div class =" component-demo " >
68- <capsule-button rounded =" none " >None</capsule-button >
69- <capsule-button rounded =" xs " >Extra Small</capsule-button >
70- <capsule-button rounded =" sm " >Small</capsule-button >
71- <capsule-button rounded =" md " >Medium</capsule-button >
72- <capsule-button rounded =" lg " >Large</capsule-button >
73- <capsule-button rounded =" xl " >XL</capsule-button >
74- <capsule-button rounded =" full " >Full</capsule-button >
40+ <capsule-button size =" sm " >Маленький</capsule-button >
41+ <capsule-button size =" default " >По умолчанию</capsule-button >
42+ <capsule-button size =" lg " >Большой</capsule-button >
43+ <capsule-button size =" icon " >
44+ <svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
45+ <path d="M8 0L10.5 5.5L16 8L10.5 10.5L8 16L5.5 10.5L0 8L5.5 5.5L8 0Z"/>
46+ </svg>
47+ </capsule-button >
7548</div >
7649
7750``` html
78- <capsule-button rounded =" none" >None</capsule-button >
79- <capsule-button rounded =" xs" >Extra Small</capsule-button >
80- <capsule-button rounded =" sm" >Small</capsule-button >
81- <capsule-button rounded =" md" >Medium</capsule-button >
82- <capsule-button rounded =" lg" >Large</capsule-button >
83- <capsule-button rounded =" xl" >XL</capsule-button >
84- <capsule-button rounded =" full" >Full</capsule-button >
51+ <capsule-button size =" sm" >Маленький</capsule-button >
52+ <capsule-button size =" default" >По умолчанию</capsule-button >
53+ <capsule-button size =" lg" >Большой</capsule-button >
54+ <capsule-button size =" icon" >
55+ <svg >...</svg >
56+ </capsule-button >
8557```
8658
8759### Состояния
@@ -102,40 +74,30 @@ npx @capsuleui/core add Button
10274
10375| Атрибут | Тип | По умолчанию | Описание |
10476| ---------- | ------- | ------------ | -------------------------------- |
105- | ` variant ` | string | ` primary ` | Стиль кнопки |
106- | ` size ` | string | ` md ` | Размер кнопки |
77+ | ` variant ` | string | ` default ` | Вариант стиля кнопки |
78+ | ` size ` | string | ` default ` | Размер кнопки |
10779| ` disabled ` | boolean | ` false ` | Отключенное состояние |
10880| ` type ` | string | ` button ` | Тип кнопки (button/submit/reset) |
109- | ` rounded ` | string | ` md ` | Степень скругления углов |
11081
11182### Доступные значения
11283
11384- ** variant** :
11485
115- - ` primary ` — Основное действие
86+ - ` default ` — Основное действие (по умолчанию)
11687 - ` secondary ` — Второстепенное действие
117- - ` outline ` — Контурная кнопка
118- - ` text ` — Текстовая кнопка
119- - ` success ` — Успешное действие
120- - ` error ` — Ошибочное действие
121- - ` warning ` — Предупреждение
122- - ` info ` — Информационное действие
88+ - ` outline ` — Контурная кнопка с границей
89+ - ` ghost ` — Прозрачная кнопка с эффектом при наведении
90+ - ` link ` — Кнопка в стиле ссылки с подчеркиванием
91+ - ` destructive ` — Опасное/деструктивное действие
12392
12493- ** size** :
12594
126- - ` xs ` — Очень маленький
127- - ` sm ` — Маленький
128- - ` md ` — Средний
129- - ` lg ` — Большой
130-
131- - ** rounded** :
132- - ` none ` — Без скруглений
133- - ` xs ` - Очень маленькое
134- - ` sm ` — Маленькое
135- - ` md ` — Среднее
136- - ` lg ` — Большое
137- - ` xl ` — Очень большое
138- - ` full ` — Полное
95+ - ` default ` — Размер по умолчанию (высота 2.25rem)
96+ - ` sm ` — Маленький (высота 2rem)
97+ - ` lg ` — Большой (высота 2.5rem)
98+ - ` icon ` — Кнопка-иконка (2.25rem × 2.25rem)
99+ - ` icon-sm ` — Маленькая кнопка-иконка (2rem × 2rem)
100+ - ` icon-lg ` — Большая кнопка-иконка (2.5rem × 2.5rem)
139101
140102## События
141103
0 commit comments