mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
re-structure to monorepo.
This commit is contained in:
32
packages/webapp/src/components/Vendors/VendorDrawerLink.tsx
Normal file
32
packages/webapp/src/components/Vendors/VendorDrawerLink.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import * as R from 'ramda';
|
||||
|
||||
import { ButtonLink } from '../Button';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
function VendorDrawerLinkComponent({
|
||||
// #ownProps
|
||||
children,
|
||||
vendorId,
|
||||
className,
|
||||
|
||||
// #withDrawerActions
|
||||
openDrawer,
|
||||
}) {
|
||||
// Handle view customer drawer.
|
||||
const handleVendorDrawer = (event) => {
|
||||
openDrawer('vendor-detail-drawer', { vendorId });
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
return (
|
||||
<ButtonLink className={className} onClick={handleVendorDrawer}>
|
||||
{children}
|
||||
</ButtonLink>
|
||||
);
|
||||
}
|
||||
|
||||
export const VendorDrawerLink = R.compose(withDrawerActions)(
|
||||
VendorDrawerLinkComponent,
|
||||
);
|
||||
Reference in New Issue
Block a user