@transferwise/components 0.0.0-experimental-ea9a101 → 0.0.0-experimental-0e166d9
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/package.json +1 -1
- package/src/button/Button.story.tsx +62 -62
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { Freeze, ArrowRight, ChevronRight } from '@transferwise/icons';
|
|
|
4
4
|
import { Flag } from '@wise/art';
|
|
5
5
|
import Button from './Button.resolver';
|
|
6
6
|
import type { ButtonProps, ButtonPriority } from './Button.types';
|
|
7
|
-
import {
|
|
7
|
+
import { lorem20, storyConfig } from '../test-utils';
|
|
8
8
|
|
|
9
9
|
const withContainer = (Story: any) => (
|
|
10
10
|
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
|
@@ -508,7 +508,7 @@ export const DisplayBlock: StoryObj<PreviewStoryArgs> = {
|
|
|
508
508
|
Full-width button
|
|
509
509
|
</Button>
|
|
510
510
|
<Button {...props} {...previewProps}>
|
|
511
|
-
{
|
|
511
|
+
{lorem20}
|
|
512
512
|
</Button>
|
|
513
513
|
</div>
|
|
514
514
|
);
|
|
@@ -572,20 +572,20 @@ export const WithIcons: StoryObj<PreviewStoryArgs> = {
|
|
|
572
572
|
docs: {
|
|
573
573
|
source: {
|
|
574
574
|
code: `
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
575
|
+
<>
|
|
576
|
+
<Button v2 size="md" addonStart={{ type: 'icon', value: <Freeze /> }}>
|
|
577
|
+
With start icon
|
|
578
|
+
</Button>
|
|
579
|
+
|
|
580
|
+
<Button v2 size="md" addonEnd={{ type: 'icon', value: <ArrowRight /> }}>
|
|
581
|
+
With end icon
|
|
582
|
+
</Button>
|
|
583
|
+
|
|
584
|
+
<Button v2 size="md" addonStart={{ type: 'icon', value: <Freeze /> }} addonEnd={{ type: 'icon', value: <ArrowRight /> }}>
|
|
585
|
+
With both icons
|
|
586
|
+
</Button>
|
|
587
|
+
</>
|
|
588
|
+
`,
|
|
589
589
|
},
|
|
590
590
|
},
|
|
591
591
|
},
|
|
@@ -647,52 +647,52 @@ export const WithAvatars: StoryObj<PreviewStoryArgs> = {
|
|
|
647
647
|
docs: {
|
|
648
648
|
source: {
|
|
649
649
|
code: `
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
650
|
+
<>
|
|
651
|
+
<Button
|
|
652
|
+
v2
|
|
653
|
+
size="md"
|
|
654
|
+
addonStart={{
|
|
655
|
+
type: 'avatar',
|
|
656
|
+
value: [{ asset: <Freeze /> }]
|
|
657
|
+
}}
|
|
658
|
+
>
|
|
659
|
+
With single avatar
|
|
660
|
+
</Button>
|
|
661
|
+
|
|
662
|
+
<Button
|
|
663
|
+
v2
|
|
664
|
+
size="md"
|
|
665
|
+
addonStart={{
|
|
666
|
+
type: 'avatar',
|
|
667
|
+
value: [{ asset: <Flag code="br" /> }, { asset: <Flag code="jp" /> }]
|
|
668
|
+
}}
|
|
669
|
+
>
|
|
670
|
+
With double avatar
|
|
671
|
+
</Button>
|
|
672
|
+
|
|
673
|
+
<Button
|
|
674
|
+
v2
|
|
675
|
+
size="md"
|
|
676
|
+
addonStart={{
|
|
677
|
+
type: 'avatar',
|
|
678
|
+
value: [{ profileName: 'John Doe' }]
|
|
679
|
+
}}
|
|
680
|
+
>
|
|
681
|
+
With initials
|
|
682
|
+
</Button>
|
|
683
|
+
|
|
684
|
+
<Button
|
|
685
|
+
v2
|
|
686
|
+
size="md"
|
|
687
|
+
addonStart={{
|
|
688
|
+
type: 'avatar',
|
|
689
|
+
value: [{ imgSrc: '../avatar-square-dude.webp' }]
|
|
690
|
+
}}
|
|
691
|
+
>
|
|
692
|
+
With image Avatar
|
|
693
|
+
</Button>
|
|
694
|
+
</>
|
|
695
|
+
`,
|
|
696
696
|
},
|
|
697
697
|
},
|
|
698
698
|
},
|