mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: quick create action on select/suggest items fields.
This commit is contained in:
37
src/containers/Drawers/QuickCreateItemDrawer/index.js
Normal file
37
src/containers/Drawers/QuickCreateItemDrawer/index.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import React from 'react';
|
||||
import { Drawer, DrawerSuspense } from 'components';
|
||||
import withDrawers from 'containers/Drawer/withDrawers';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
const QuickCretaeItemDrawerContent = React.lazy(() =>
|
||||
import('./QuickCreateItemDrawerContent'),
|
||||
);
|
||||
|
||||
/**
|
||||
* Quick create item.
|
||||
*/
|
||||
function QuickCreateItemDrawer({
|
||||
// #ownProps
|
||||
name,
|
||||
|
||||
// #withDrawer
|
||||
isOpen,
|
||||
payload,
|
||||
}) {
|
||||
return (
|
||||
<Drawer
|
||||
isOpen={isOpen}
|
||||
name={name}
|
||||
style={{ minWidth: '800px', maxWidth: '1000px' }}
|
||||
size={'72%'}
|
||||
payload={payload}
|
||||
>
|
||||
<DrawerSuspense>
|
||||
<QuickCretaeItemDrawerContent itemName={payload.name} />
|
||||
</DrawerSuspense>
|
||||
</Drawer>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(withDrawers())(QuickCreateItemDrawer);
|
||||
Reference in New Issue
Block a user