mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
35
src/components/Drawer/Drawer.js
Normal file
35
src/components/Drawer/Drawer.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import React from 'react';
|
||||
import { Position, Drawer } from '@blueprintjs/core';
|
||||
|
||||
import 'style/components/Drawer.scss';
|
||||
|
||||
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||
import { compose } from 'utils';
|
||||
|
||||
/**
|
||||
* Drawer component.
|
||||
*/
|
||||
function DrawerComponent(props) {
|
||||
const { name, children, onClose, closeDrawer } = props;
|
||||
|
||||
const handleClose = (event) => {
|
||||
closeDrawer(name);
|
||||
onClose && onClose(event);
|
||||
};
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
size={'700px'}
|
||||
canOutsideClickClose={true}
|
||||
canEscapeKeyClose={true}
|
||||
position={Position.RIGHT}
|
||||
onClose={handleClose}
|
||||
portalClassName={'drawer-portal'}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</Drawer>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDrawerActions)(DrawerComponent);
|
||||
Reference in New Issue
Block a user