@toptal/picasso 26.8.0 → 26.9.0
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/Drawer/Drawer.d.ts +3 -1
- package/Drawer/Drawer.js +2 -2
- package/Drawer/Drawer.js.map +1 -1
- package/package.json +1 -1
package/Drawer/Drawer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseProps } from '@toptal/picasso-shared';
|
|
1
|
+
import { BaseProps, TransitionProps } from '@toptal/picasso-shared';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
declare type AnchorType = 'bottom' | 'left' | 'right' | 'top';
|
|
4
4
|
declare type WidthType = 'narrow' | 'regular' | 'medium' | 'wide' | 'ultra-wide';
|
|
@@ -17,6 +17,8 @@ export interface Props extends BaseProps {
|
|
|
17
17
|
onClose?: () => void;
|
|
18
18
|
/** Width of Drawer */
|
|
19
19
|
width?: WidthType;
|
|
20
|
+
/** Animation lifecycle callbacks. Backed by [react-transition-group/Transition](https://reactcommunity.org/react-transition-group/transition#Transition-props) */
|
|
21
|
+
transitionProps?: TransitionProps;
|
|
20
22
|
}
|
|
21
23
|
export declare const Drawer: {
|
|
22
24
|
(props: Props): JSX.Element;
|
package/Drawer/Drawer.js
CHANGED
|
@@ -22,7 +22,7 @@ import DrawerTitle from '../DrawerTitle';
|
|
|
22
22
|
import { useIsomorphicLayoutEffect } from '../utils';
|
|
23
23
|
const useStyles = makeStyles(styles, { name: 'PicassoDrawer' });
|
|
24
24
|
export const Drawer = (props) => {
|
|
25
|
-
const { children, disablePortal, open, onClose, title, width = 'regular' } = props, rest = __rest(props, ["children", "disablePortal", "open", "onClose", "title", "width"]);
|
|
25
|
+
const { children, disablePortal, open, onClose, title, width = 'regular', transitionProps } = props, rest = __rest(props, ["children", "disablePortal", "open", "onClose", "title", "width", "transitionProps"]);
|
|
26
26
|
const classes = useStyles();
|
|
27
27
|
const { setHasDrawer } = useDrawer();
|
|
28
28
|
const theme = useTheme();
|
|
@@ -39,7 +39,7 @@ export const Drawer = (props) => {
|
|
|
39
39
|
onClose();
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return (React.createElement(MUIDrawer, Object.assign({}, rest, { open: open, onClose: handleOnClose, disablePortal: disablePortal, container: container, ModalProps: { style: { zIndex: theme.zIndex.drawer } } }),
|
|
42
|
+
return (React.createElement(MUIDrawer, Object.assign({}, rest, { open: open, onClose: handleOnClose, disablePortal: disablePortal, container: container, ModalProps: { style: { zIndex: theme.zIndex.drawer } }, SlideProps: transitionProps }),
|
|
43
43
|
React.createElement(Container, { flex: true, direction: 'column', className: cx(classes.container, classes[width]) },
|
|
44
44
|
React.createElement(DrawerTitle, { title: title }),
|
|
45
45
|
React.createElement(Container, { flex: true, className: classes.content }, children),
|
package/Drawer/Drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,UAAU,EAAS,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,SAAS,MAAM,cAAc,CAAA;AACpC,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":";;;;;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