@transferwise/components 0.0.0-experimental-a4db2ca → 0.0.0-experimental-f63094c
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/build/index.js +36 -11
- package/build/index.js.map +1 -1
- package/build/index.mjs +35 -10
- package/build/index.mjs.map +1 -1
- package/build/types/button/Button.messages.d.ts +3 -3
- package/build/types/button/classMap.d.ts +6 -6
- package/build/types/common/panel/Panel.d.ts +1 -1
- package/build/types/common/responsivePanel/ResponsivePanel.d.ts +1 -1
- package/build/types/drawer/Drawer.d.ts +36 -19
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/drawer/index.d.ts +1 -2
- package/build/types/drawer/index.d.ts.map +1 -1
- package/build/types/flowNavigation/backButton/BackButton.d.ts +3 -3
- package/build/types/flowNavigation/backButton/index.d.ts +1 -1
- package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/select/index.d.ts +1 -1
- package/build/types/select/index.d.ts.map +1 -1
- package/build/types/select/option/index.d.ts +1 -1
- package/build/types/select/option/index.d.ts.map +1 -1
- package/build/types/tabs/TabList.d.ts +1 -1
- package/build/types/tabs/TabPanel.d.ts +4 -4
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/upload/Upload.messages.d.ts +20 -20
- package/build/types/upload/steps/completeStep/completeStep.d.ts +10 -10
- package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +8 -8
- package/build/types/upload/steps/processingStep/processingStep.d.ts +8 -8
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +9 -9
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/drawer/{Drawer.tsx → Drawer.js} +31 -26
- package/src/drawer/{Drawer.rtl.spec.tsx → Drawer.rtl.spec.js} +2 -4
- package/src/drawer/{Drawer.story.tsx → Drawer.story.js} +28 -20
- package/src/drawer/index.js +1 -0
- package/src/index.ts +0 -1
- package/src/drawer/index.ts +0 -2
- /package/src/drawer/__snapshots__/{Drawer.rtl.spec.tsx.snap → Drawer.rtl.spec.js.snap} +0 -0
|
@@ -3,6 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Section, Button, Input, Modal } from '..';
|
|
5
5
|
import { Position, Priority } from '../common';
|
|
6
|
+
import { storyConfig } from '../test-utils';
|
|
6
7
|
|
|
7
8
|
import Drawer from './Drawer';
|
|
8
9
|
|
|
@@ -16,6 +17,18 @@ export const Basic = () => {
|
|
|
16
17
|
const [openModal, setOpenModal] = useState(false);
|
|
17
18
|
const position = select('position', [Position.LEFT, Position.RIGHT], Position.RIGHT);
|
|
18
19
|
|
|
20
|
+
const handleDrawerClose = (event) => {
|
|
21
|
+
console.log('drawer close');
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
setOpenDrawer(false);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const handleModalClose = (event) => {
|
|
27
|
+
console.log('modal close');
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
setOpenModal(false);
|
|
30
|
+
};
|
|
31
|
+
|
|
19
32
|
return (
|
|
20
33
|
<>
|
|
21
34
|
<Button disabled={false} block={false} onClick={() => setOpenDrawer(true)}>
|
|
@@ -35,11 +48,7 @@ export const Basic = () => {
|
|
|
35
48
|
</Button>
|
|
36
49
|
</>
|
|
37
50
|
}
|
|
38
|
-
onClose={
|
|
39
|
-
console.log('drawer close');
|
|
40
|
-
event.stopPropagation();
|
|
41
|
-
setOpenDrawer(false);
|
|
42
|
-
}}
|
|
51
|
+
onClose={handleDrawerClose}
|
|
43
52
|
>
|
|
44
53
|
<p>
|
|
45
54
|
I am baby actually poke kickstarter, street art jean shorts bespoke chambray activated
|
|
@@ -53,24 +62,23 @@ export const Basic = () => {
|
|
|
53
62
|
<Button onClick={() => setOpenModal(true)}>Open Modal</Button>
|
|
54
63
|
<Modal
|
|
55
64
|
body={
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
<>
|
|
66
|
+
<p className="m-t-4">
|
|
67
|
+
I am baby actually poke kickstarter, street art jean shorts bespoke chambray
|
|
68
|
+
activated charcoal ramps marfa shoreditch tumeric tumblr. Mixtape cred palo santo,
|
|
69
|
+
cliche lyft marfa ethical waistcoat poke jean shorts. Scenester readymade selvage
|
|
70
|
+
disrupt pok pok. La croix stumptown try-hard chartreuse. I am baby actually poke
|
|
71
|
+
kickstarter, street art jean shorts bespoke chambray activated charcoal ramps
|
|
72
|
+
marfa shoreditch tumeric, I am baby actually poke kickstarter, street art jean
|
|
73
|
+
shorts bespoke chambray activated charcoal ramps marfa shoreditch tumeric tumblr.
|
|
74
|
+
Mixtape cred palo santo, cliche lyft marfa ethical waistcoat poke jean shorts.
|
|
75
|
+
Scenester readymade selvage disrupt pok pok.
|
|
76
|
+
</p>
|
|
77
|
+
</>
|
|
67
78
|
}
|
|
68
79
|
open={openModal}
|
|
69
80
|
title="Title"
|
|
70
|
-
onClose={
|
|
71
|
-
console.log('modal close');
|
|
72
|
-
setOpenModal(false);
|
|
73
|
-
}}
|
|
81
|
+
onClose={handleModalClose}
|
|
74
82
|
/>
|
|
75
83
|
</Section>
|
|
76
84
|
<p>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Drawer';
|
package/src/index.ts
CHANGED
|
@@ -24,7 +24,6 @@ export type { DateLookupProps } from './dateLookup';
|
|
|
24
24
|
export type { DecisionProps } from './decision/Decision';
|
|
25
25
|
export type { DefinitionListProps } from './definitionList';
|
|
26
26
|
export type { DimmerProps } from './dimmer';
|
|
27
|
-
export type { DrawerProps } from './drawer';
|
|
28
27
|
export type { EmphasisProps } from './emphasis';
|
|
29
28
|
export type { FieldProps } from './field/Field';
|
|
30
29
|
export type { InfoProps } from './info';
|
package/src/drawer/index.ts
DELETED
|
File without changes
|