@sberbusiness/triplex-next-mcp-server 0.24.0-beta1 → 0.24.0-beta2
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/bundle/components/Alert.md +272 -0
- package/bundle/components/Amount.md +138 -0
- package/bundle/components/AmountField.md +174 -0
- package/bundle/components/Avatar.md +72 -0
- package/bundle/components/Badge.md +203 -0
- package/bundle/components/Button.md +280 -0
- package/bundle/components/ButtonDropdown.md +300 -0
- package/bundle/components/ButtonIcon.md +69 -0
- package/bundle/components/Calendar.md +58 -0
- package/bundle/components/Checkbox.md +112 -0
- package/bundle/components/CheckboxTree.md +61 -0
- package/bundle/components/CheckboxTreeExtended.md +114 -0
- package/bundle/components/CheckboxXGroup.md +41 -0
- package/bundle/components/CheckboxYGroup.md +45 -0
- package/bundle/components/EmptyView.md +119 -0
- package/bundle/components/HelpBox.md +198 -0
- package/bundle/components/SliderExtended.md +285 -0
- package/bundle/manifest.json +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -275,3 +275,206 @@ export const Badge = Object.assign(
|
|
|
275
275
|
| Дата | Изменение |
|
|
276
276
|
|---|---|
|
|
277
277
|
| 2026-04-18 | Создан документ |
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Примеры использования
|
|
282
|
+
|
|
283
|
+
### Default
|
|
284
|
+
|
|
285
|
+
`stories/Badge/examples/DefaultExample.tsx`
|
|
286
|
+
|
|
287
|
+
```tsx
|
|
288
|
+
import React from "react";
|
|
289
|
+
import { Badge, EComponentSize, EFontType, EFontWeightText, ETextSize, Text } from "@sberbusiness/triplex-next";
|
|
290
|
+
|
|
291
|
+
export const DefaultExample = () => (
|
|
292
|
+
<Badge size={EComponentSize.MD}>
|
|
293
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
294
|
+
Badge text
|
|
295
|
+
</Text>
|
|
296
|
+
</Badge>
|
|
297
|
+
);
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Sizes
|
|
301
|
+
|
|
302
|
+
`stories/Badge/examples/SizesExample.tsx`
|
|
303
|
+
|
|
304
|
+
```tsx
|
|
305
|
+
import React from "react";
|
|
306
|
+
import {
|
|
307
|
+
Badge,
|
|
308
|
+
Caption,
|
|
309
|
+
ECaptionSize,
|
|
310
|
+
EComponentSize,
|
|
311
|
+
EFontType,
|
|
312
|
+
EFontWeightCaption,
|
|
313
|
+
EFontWeightText,
|
|
314
|
+
ETextSize,
|
|
315
|
+
Text,
|
|
316
|
+
} from "@sberbusiness/triplex-next";
|
|
317
|
+
|
|
318
|
+
export const SizesExample = () => (
|
|
319
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "16px", maxWidth: "150px" }}>
|
|
320
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
321
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>SM</div>
|
|
322
|
+
<Badge size={EComponentSize.SM}>
|
|
323
|
+
<Caption size={ECaptionSize.C1} weight={EFontWeightCaption.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
324
|
+
Badge text SM
|
|
325
|
+
</Caption>
|
|
326
|
+
</Badge>
|
|
327
|
+
</div>
|
|
328
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
329
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>MD</div>
|
|
330
|
+
<Badge size={EComponentSize.MD}>
|
|
331
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
332
|
+
Badge text MD
|
|
333
|
+
</Text>
|
|
334
|
+
</Badge>
|
|
335
|
+
</div>
|
|
336
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
337
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>LG</div>
|
|
338
|
+
<Badge size={EComponentSize.LG}>
|
|
339
|
+
<Text size={ETextSize.B3} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
340
|
+
Badge text LG
|
|
341
|
+
</Text>
|
|
342
|
+
</Badge>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
);
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### WithPrefixAndPostfix
|
|
349
|
+
|
|
350
|
+
`stories/Badge/examples/WithPrefixAndPostfixExample.tsx`
|
|
351
|
+
|
|
352
|
+
```tsx
|
|
353
|
+
import React from "react";
|
|
354
|
+
import {
|
|
355
|
+
PercentsmallStrokeSrvIcon16,
|
|
356
|
+
PercentsmallStrokeSrvIcon20,
|
|
357
|
+
PercentsmallStrokeSrvIcon24,
|
|
358
|
+
} from "@sberbusiness/icons-next";
|
|
359
|
+
import {
|
|
360
|
+
Badge,
|
|
361
|
+
Caption,
|
|
362
|
+
ECaptionSize,
|
|
363
|
+
EComponentSize,
|
|
364
|
+
EFontType,
|
|
365
|
+
EFontWeightCaption,
|
|
366
|
+
EFontWeightText,
|
|
367
|
+
ETextSize,
|
|
368
|
+
Text,
|
|
369
|
+
} from "@sberbusiness/triplex-next";
|
|
370
|
+
|
|
371
|
+
export const WithPrefixAndPostfixExample = () => (
|
|
372
|
+
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
|
|
373
|
+
<Badge
|
|
374
|
+
size={EComponentSize.SM}
|
|
375
|
+
prefix={<PercentsmallStrokeSrvIcon16 paletteIndex={7} />}
|
|
376
|
+
postfix={<PercentsmallStrokeSrvIcon16 paletteIndex={7} />}
|
|
377
|
+
>
|
|
378
|
+
<Caption size={ECaptionSize.C1} weight={EFontWeightCaption.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
379
|
+
Badge text SM
|
|
380
|
+
</Caption>
|
|
381
|
+
</Badge>
|
|
382
|
+
<Badge
|
|
383
|
+
size={EComponentSize.MD}
|
|
384
|
+
prefix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}
|
|
385
|
+
postfix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}
|
|
386
|
+
>
|
|
387
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
388
|
+
Badge text MD
|
|
389
|
+
</Text>
|
|
390
|
+
</Badge>
|
|
391
|
+
<Badge
|
|
392
|
+
size={EComponentSize.LG}
|
|
393
|
+
prefix={<PercentsmallStrokeSrvIcon24 paletteIndex={7} />}
|
|
394
|
+
postfix={<PercentsmallStrokeSrvIcon24 paletteIndex={7} />}
|
|
395
|
+
>
|
|
396
|
+
<Text size={ETextSize.B3} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
397
|
+
Badge text LG
|
|
398
|
+
</Text>
|
|
399
|
+
</Badge>
|
|
400
|
+
</div>
|
|
401
|
+
);
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### DotSizes
|
|
405
|
+
|
|
406
|
+
`stories/Badge/examples/DotSizesExample.tsx`
|
|
407
|
+
|
|
408
|
+
```tsx
|
|
409
|
+
import React from "react";
|
|
410
|
+
import { Badge, EComponentSize } from "@sberbusiness/triplex-next";
|
|
411
|
+
|
|
412
|
+
const SIZES = Object.values(EComponentSize);
|
|
413
|
+
|
|
414
|
+
export const DotSizesExample = () => (
|
|
415
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
|
|
416
|
+
{SIZES.map((size) => (
|
|
417
|
+
<div key={size} style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
418
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>{size.toUpperCase()}</div>
|
|
419
|
+
<Badge.Dot size={size} />
|
|
420
|
+
</div>
|
|
421
|
+
))}
|
|
422
|
+
</div>
|
|
423
|
+
);
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Example
|
|
427
|
+
|
|
428
|
+
`stories/Badge/examples/ProductionExample.tsx`
|
|
429
|
+
|
|
430
|
+
```tsx
|
|
431
|
+
import React from "react";
|
|
432
|
+
import { NewsmallFilledSrvIcon20, PercentsmallStrokeSrvIcon20 } from "@sberbusiness/icons-next";
|
|
433
|
+
import { Badge, EComponentSize, EFontType, EFontWeightText, ETextSize, Text } from "@sberbusiness/triplex-next";
|
|
434
|
+
|
|
435
|
+
export const ProductionExample = () => (
|
|
436
|
+
<div style={{ display: "flex", gap: "16px" }}>
|
|
437
|
+
<Badge size={EComponentSize.MD} prefix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />} />
|
|
438
|
+
<Badge size={EComponentSize.MD} prefix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}>
|
|
439
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
440
|
+
Badge text
|
|
441
|
+
</Text>
|
|
442
|
+
</Badge>
|
|
443
|
+
<Badge size={EComponentSize.MD} postfix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}>
|
|
444
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
445
|
+
Badge text
|
|
446
|
+
</Text>
|
|
447
|
+
</Badge>
|
|
448
|
+
<Badge
|
|
449
|
+
size={EComponentSize.MD}
|
|
450
|
+
prefix={<NewsmallFilledSrvIcon20 paletteIndex={7} />}
|
|
451
|
+
style={{ backgroundColor: "#1297FE" }}
|
|
452
|
+
>
|
|
453
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
|
|
454
|
+
Новинка
|
|
455
|
+
</Text>
|
|
456
|
+
</Badge>
|
|
457
|
+
<Badge size={EComponentSize.MD} style={{ backgroundColor: "#E3FFFA" }}>
|
|
458
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.BRAND}>
|
|
459
|
+
Рисков не выявлено
|
|
460
|
+
</Text>
|
|
461
|
+
</Badge>
|
|
462
|
+
<Badge size={EComponentSize.MD} style={{ backgroundColor: "#FFF0F3" }}>
|
|
463
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.ERROR}>
|
|
464
|
+
Негативные факторы
|
|
465
|
+
</Text>
|
|
466
|
+
</Badge>
|
|
467
|
+
<Badge size={EComponentSize.MD} style={{ backgroundColor: "#FFF4DB" }}>
|
|
468
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.WARNING}>
|
|
469
|
+
Обратите внимание
|
|
470
|
+
</Text>
|
|
471
|
+
</Badge>
|
|
472
|
+
<Badge size={EComponentSize.MD} style={{ backgroundColor: "#EEF3FC" }}>
|
|
473
|
+
<Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.SYSTEM}>
|
|
474
|
+
Нет данных
|
|
475
|
+
</Text>
|
|
476
|
+
</Badge>
|
|
477
|
+
</div>
|
|
478
|
+
);
|
|
479
|
+
```
|
|
480
|
+
|
|
@@ -228,3 +228,283 @@ const iconOnly = Boolean(icon) && !children;
|
|
|
228
228
|
| Дата | Изменение |
|
|
229
229
|
|---|---|
|
|
230
230
|
| 2026-03-31 | Создан документ (пилот AI-Ready) |
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Примеры использования
|
|
235
|
+
|
|
236
|
+
### Default
|
|
237
|
+
|
|
238
|
+
`stories/Buttons/examples/Button/DefaultExample.tsx`
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
import React from "react";
|
|
242
|
+
import { Button, EButtonTheme, EComponentSize } from "@sberbusiness/triplex-next";
|
|
243
|
+
|
|
244
|
+
export const DefaultExample = () => (
|
|
245
|
+
<div style={{ maxWidth: "250px" }}>
|
|
246
|
+
<Button theme={EButtonTheme.GENERAL} size={EComponentSize.MD}>
|
|
247
|
+
Button text
|
|
248
|
+
</Button>
|
|
249
|
+
</div>
|
|
250
|
+
);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### States
|
|
254
|
+
|
|
255
|
+
`stories/Buttons/examples/Button/StatesExample.tsx`
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import React from "react";
|
|
259
|
+
import { DefaulticonStrokePrdIcon20 } from "@sberbusiness/icons-next";
|
|
260
|
+
import { Button, EButtonTheme, EComponentSize } from "@sberbusiness/triplex-next";
|
|
261
|
+
|
|
262
|
+
export const StatesExample = () => (
|
|
263
|
+
<div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
|
|
264
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
265
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>Expanded</div>
|
|
266
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
267
|
+
<Button theme={EButtonTheme.GENERAL} size={EComponentSize.MD} aria-expanded>
|
|
268
|
+
General
|
|
269
|
+
</Button>
|
|
270
|
+
<Button theme={EButtonTheme.SECONDARY} size={EComponentSize.MD} aria-expanded>
|
|
271
|
+
Secondary
|
|
272
|
+
</Button>
|
|
273
|
+
<Button theme={EButtonTheme.SECONDARY_LIGHT} size={EComponentSize.MD} aria-expanded>
|
|
274
|
+
Secondary Light
|
|
275
|
+
</Button>
|
|
276
|
+
<Button theme={EButtonTheme.DANGER} size={EComponentSize.MD} aria-expanded>
|
|
277
|
+
Danger
|
|
278
|
+
</Button>
|
|
279
|
+
<Button
|
|
280
|
+
theme={EButtonTheme.GENERAL}
|
|
281
|
+
size={EComponentSize.MD}
|
|
282
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={7} />}
|
|
283
|
+
aria-expanded
|
|
284
|
+
/>
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
288
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>Loading</div>
|
|
289
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
290
|
+
<Button loading theme={EButtonTheme.GENERAL} size={EComponentSize.MD}>
|
|
291
|
+
Button text
|
|
292
|
+
</Button>
|
|
293
|
+
<Button loading theme={EButtonTheme.SECONDARY} size={EComponentSize.MD}>
|
|
294
|
+
Button text
|
|
295
|
+
</Button>
|
|
296
|
+
<Button loading theme={EButtonTheme.SECONDARY_LIGHT} size={EComponentSize.MD}>
|
|
297
|
+
Button text
|
|
298
|
+
</Button>
|
|
299
|
+
<Button loading theme={EButtonTheme.DANGER} size={EComponentSize.MD}>
|
|
300
|
+
Button text
|
|
301
|
+
</Button>
|
|
302
|
+
<Button
|
|
303
|
+
loading
|
|
304
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={0} />}
|
|
305
|
+
size={EComponentSize.MD}
|
|
306
|
+
theme={EButtonTheme.GENERAL}
|
|
307
|
+
/>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
311
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>Disabled</div>
|
|
312
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
313
|
+
<Button disabled theme={EButtonTheme.GENERAL} size={EComponentSize.MD}>
|
|
314
|
+
General
|
|
315
|
+
</Button>
|
|
316
|
+
<Button disabled theme={EButtonTheme.SECONDARY} size={EComponentSize.MD}>
|
|
317
|
+
Secondary
|
|
318
|
+
</Button>
|
|
319
|
+
<Button disabled theme={EButtonTheme.SECONDARY_LIGHT} size={EComponentSize.MD}>
|
|
320
|
+
Secondary Light
|
|
321
|
+
</Button>
|
|
322
|
+
<Button disabled theme={EButtonTheme.DANGER} size={EComponentSize.MD}>
|
|
323
|
+
Danger
|
|
324
|
+
</Button>
|
|
325
|
+
<Button disabled theme={EButtonTheme.LINK} size={EComponentSize.MD}>
|
|
326
|
+
Link
|
|
327
|
+
</Button>
|
|
328
|
+
<Button
|
|
329
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={7} />}
|
|
330
|
+
size={EComponentSize.MD}
|
|
331
|
+
theme={EButtonTheme.GENERAL}
|
|
332
|
+
disabled
|
|
333
|
+
/>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
337
|
+
);
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Sizes
|
|
341
|
+
|
|
342
|
+
`stories/Buttons/examples/Button/SizesExample.tsx`
|
|
343
|
+
|
|
344
|
+
```tsx
|
|
345
|
+
import React from "react";
|
|
346
|
+
import { Button, EButtonTheme, EComponentSize } from "@sberbusiness/triplex-next";
|
|
347
|
+
|
|
348
|
+
export const SizesExample = () => (
|
|
349
|
+
<div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
|
|
350
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
351
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>SM</div>
|
|
352
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
353
|
+
<Button size={EComponentSize.SM} theme={EButtonTheme.GENERAL}>
|
|
354
|
+
Button text
|
|
355
|
+
</Button>
|
|
356
|
+
<Button size={EComponentSize.SM} theme={EButtonTheme.SECONDARY}>
|
|
357
|
+
Button text
|
|
358
|
+
</Button>
|
|
359
|
+
<Button size={EComponentSize.SM} theme={EButtonTheme.SECONDARY_LIGHT}>
|
|
360
|
+
Button text
|
|
361
|
+
</Button>
|
|
362
|
+
<Button size={EComponentSize.SM} theme={EButtonTheme.DANGER}>
|
|
363
|
+
Button text
|
|
364
|
+
</Button>
|
|
365
|
+
<Button size={EComponentSize.SM} theme={EButtonTheme.LINK}>
|
|
366
|
+
Button text
|
|
367
|
+
</Button>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
371
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>MD</div>
|
|
372
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
373
|
+
<Button size={EComponentSize.MD} theme={EButtonTheme.GENERAL}>
|
|
374
|
+
Button text
|
|
375
|
+
</Button>
|
|
376
|
+
<Button size={EComponentSize.MD} theme={EButtonTheme.SECONDARY}>
|
|
377
|
+
Button text
|
|
378
|
+
</Button>
|
|
379
|
+
<Button size={EComponentSize.MD} theme={EButtonTheme.SECONDARY_LIGHT}>
|
|
380
|
+
Button text
|
|
381
|
+
</Button>
|
|
382
|
+
<Button size={EComponentSize.MD} theme={EButtonTheme.DANGER}>
|
|
383
|
+
Button text
|
|
384
|
+
</Button>
|
|
385
|
+
<Button size={EComponentSize.MD} theme={EButtonTheme.LINK}>
|
|
386
|
+
Button text
|
|
387
|
+
</Button>
|
|
388
|
+
</div>
|
|
389
|
+
</div>
|
|
390
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
391
|
+
<div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>LG</div>
|
|
392
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
393
|
+
<Button size={EComponentSize.LG} theme={EButtonTheme.GENERAL}>
|
|
394
|
+
Button text
|
|
395
|
+
</Button>
|
|
396
|
+
<Button size={EComponentSize.LG} theme={EButtonTheme.SECONDARY}>
|
|
397
|
+
Button text
|
|
398
|
+
</Button>
|
|
399
|
+
<Button size={EComponentSize.LG} theme={EButtonTheme.SECONDARY_LIGHT}>
|
|
400
|
+
Button text
|
|
401
|
+
</Button>
|
|
402
|
+
<Button size={EComponentSize.LG} theme={EButtonTheme.DANGER}>
|
|
403
|
+
Button text
|
|
404
|
+
</Button>
|
|
405
|
+
<Button size={EComponentSize.LG} theme={EButtonTheme.LINK}>
|
|
406
|
+
Button text
|
|
407
|
+
</Button>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
</div>
|
|
411
|
+
);
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Themes
|
|
415
|
+
|
|
416
|
+
`stories/Buttons/examples/Button/ThemesExample.tsx`
|
|
417
|
+
|
|
418
|
+
```tsx
|
|
419
|
+
import React from "react";
|
|
420
|
+
import { Button, EButtonTheme, EComponentSize } from "@sberbusiness/triplex-next";
|
|
421
|
+
|
|
422
|
+
export const ThemesExample = () => (
|
|
423
|
+
<div style={{ display: "flex", flexWrap: "wrap", alignItems: "center", gap: 16 }}>
|
|
424
|
+
<Button theme={EButtonTheme.GENERAL} size={EComponentSize.MD}>
|
|
425
|
+
General
|
|
426
|
+
</Button>
|
|
427
|
+
<Button theme={EButtonTheme.SECONDARY} size={EComponentSize.MD}>
|
|
428
|
+
Secondary
|
|
429
|
+
</Button>
|
|
430
|
+
<Button theme={EButtonTheme.SECONDARY_LIGHT} size={EComponentSize.MD}>
|
|
431
|
+
Secondary Light
|
|
432
|
+
</Button>
|
|
433
|
+
<Button theme={EButtonTheme.DANGER} size={EComponentSize.MD}>
|
|
434
|
+
Danger
|
|
435
|
+
</Button>
|
|
436
|
+
<Button theme={EButtonTheme.LINK} size={EComponentSize.MD}>
|
|
437
|
+
Link
|
|
438
|
+
</Button>
|
|
439
|
+
</div>
|
|
440
|
+
);
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### WithIcon
|
|
444
|
+
|
|
445
|
+
`stories/Buttons/examples/Button/WithIconExample.tsx`
|
|
446
|
+
|
|
447
|
+
```tsx
|
|
448
|
+
import React from "react";
|
|
449
|
+
import { DefaulticonStrokePrdIcon20, DefaulticonStrokePrdIcon32 } from "@sberbusiness/icons-next";
|
|
450
|
+
import { Button, EButtonTheme, EComponentSize } from "@sberbusiness/triplex-next";
|
|
451
|
+
|
|
452
|
+
export const WithIconExample = () => (
|
|
453
|
+
<div style={{ display: "flex", alignItems: "center", gap: 16 }}>
|
|
454
|
+
<Button
|
|
455
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={7} />}
|
|
456
|
+
size={EComponentSize.SM}
|
|
457
|
+
theme={EButtonTheme.GENERAL}
|
|
458
|
+
/>
|
|
459
|
+
<Button
|
|
460
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={0} />}
|
|
461
|
+
size={EComponentSize.MD}
|
|
462
|
+
theme={EButtonTheme.SECONDARY}
|
|
463
|
+
/>
|
|
464
|
+
<Button
|
|
465
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={0} />}
|
|
466
|
+
size={EComponentSize.MD}
|
|
467
|
+
theme={EButtonTheme.SECONDARY_LIGHT}
|
|
468
|
+
/>
|
|
469
|
+
<Button
|
|
470
|
+
icon={<DefaulticonStrokePrdIcon32 paletteIndex={7} />}
|
|
471
|
+
size={EComponentSize.LG}
|
|
472
|
+
theme={EButtonTheme.DANGER}
|
|
473
|
+
/>
|
|
474
|
+
</div>
|
|
475
|
+
);
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### BlockMode
|
|
479
|
+
|
|
480
|
+
`stories/Buttons/examples/Button/BlockModeExample.tsx`
|
|
481
|
+
|
|
482
|
+
```tsx
|
|
483
|
+
import React from "react";
|
|
484
|
+
import { DefaulticonStrokePrdIcon20 } from "@sberbusiness/icons-next";
|
|
485
|
+
import { Button, EButtonTheme, EComponentSize, Gap } from "@sberbusiness/triplex-next";
|
|
486
|
+
|
|
487
|
+
export const BlockModeExample = () => (
|
|
488
|
+
<div style={{ maxWidth: 280 }}>
|
|
489
|
+
<Button block theme={EButtonTheme.GENERAL} size={EComponentSize.MD}>
|
|
490
|
+
General
|
|
491
|
+
</Button>
|
|
492
|
+
<Gap size={16} />
|
|
493
|
+
<Button block theme={EButtonTheme.SECONDARY} size={EComponentSize.MD}>
|
|
494
|
+
Secondary
|
|
495
|
+
</Button>
|
|
496
|
+
<Gap size={16} />
|
|
497
|
+
<Button block theme={EButtonTheme.SECONDARY_LIGHT} size={EComponentSize.MD}>
|
|
498
|
+
Secondary Light
|
|
499
|
+
</Button>
|
|
500
|
+
<Gap size={16} />
|
|
501
|
+
<Button
|
|
502
|
+
block
|
|
503
|
+
size={EComponentSize.MD}
|
|
504
|
+
theme={EButtonTheme.DANGER}
|
|
505
|
+
icon={<DefaulticonStrokePrdIcon20 paletteIndex={7} />}
|
|
506
|
+
/>
|
|
507
|
+
</div>
|
|
508
|
+
);
|
|
509
|
+
```
|
|
510
|
+
|