@transferwise/components 0.0.0-experimental-a4db2ca → 0.0.0-experimental-2ce5185

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.
Files changed (42) hide show
  1. package/build/index.js +36 -11
  2. package/build/index.js.map +1 -1
  3. package/build/index.mjs +35 -10
  4. package/build/index.mjs.map +1 -1
  5. package/build/types/button/Button.messages.d.ts +3 -3
  6. package/build/types/button/classMap.d.ts +6 -6
  7. package/build/types/common/panel/Panel.d.ts +1 -1
  8. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +1 -1
  9. package/build/types/drawer/Drawer.d.ts +36 -19
  10. package/build/types/drawer/Drawer.d.ts.map +1 -1
  11. package/build/types/drawer/index.d.ts +1 -2
  12. package/build/types/drawer/index.d.ts.map +1 -1
  13. package/build/types/flowNavigation/backButton/BackButton.d.ts +3 -3
  14. package/build/types/flowNavigation/backButton/index.d.ts +1 -1
  15. package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
  16. package/build/types/index.d.ts +0 -1
  17. package/build/types/index.d.ts.map +1 -1
  18. package/build/types/select/index.d.ts +1 -1
  19. package/build/types/select/index.d.ts.map +1 -1
  20. package/build/types/select/option/index.d.ts +1 -1
  21. package/build/types/select/option/index.d.ts.map +1 -1
  22. package/build/types/tabs/TabList.d.ts +1 -1
  23. package/build/types/tabs/TabPanel.d.ts +4 -4
  24. package/build/types/tabs/Tabs.d.ts.map +1 -1
  25. package/build/types/test-utils/story-config.d.ts.map +1 -1
  26. package/build/types/typeahead/Typeahead.d.ts.map +1 -1
  27. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
  28. package/build/types/upload/Upload.d.ts.map +1 -1
  29. package/build/types/upload/Upload.messages.d.ts +20 -20
  30. package/build/types/upload/steps/completeStep/completeStep.d.ts +10 -10
  31. package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +8 -8
  32. package/build/types/upload/steps/processingStep/processingStep.d.ts +8 -8
  33. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +9 -9
  34. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
  35. package/package.json +3 -3
  36. package/src/drawer/{Drawer.tsx → Drawer.js} +31 -26
  37. package/src/drawer/{Drawer.rtl.spec.tsx → Drawer.rtl.spec.js} +2 -4
  38. package/src/drawer/{Drawer.story.tsx → Drawer.story.js} +28 -20
  39. package/src/drawer/index.js +1 -0
  40. package/src/index.ts +0 -1
  41. package/src/drawer/index.ts +0 -2
  42. /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={(event) => {
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
- <p className="m-t-4">
57
- I am baby actually poke kickstarter, street art jean shorts bespoke chambray
58
- activated charcoal ramps marfa shoreditch tumeric tumblr. Mixtape cred palo santo,
59
- cliche lyft marfa ethical waistcoat poke jean shorts. Scenester readymade selvage
60
- disrupt pok pok. La croix stumptown try-hard chartreuse. I am baby actually poke
61
- kickstarter, street art jean shorts bespoke chambray activated charcoal ramps marfa
62
- shoreditch tumeric, I am baby actually poke kickstarter, street art jean shorts
63
- bespoke chambray activated charcoal ramps marfa shoreditch tumeric tumblr. Mixtape
64
- cred palo santo, cliche lyft marfa ethical waistcoat poke jean shorts. Scenester
65
- readymade selvage disrupt pok pok.
66
- </p>
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';
@@ -1,2 +0,0 @@
1
- export { default } from './Drawer';
2
- export type { DrawerProps } from './Drawer';