mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
24 lines
586 B
JavaScript
24 lines
586 B
JavaScript
import React from 'react';
|
|
import * as R from 'ramda';
|
|
|
|
import { ButtonLink } from 'components';
|
|
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
|
|
|
function VendorDrawerLinkComponent({
|
|
// #ownProps
|
|
children,
|
|
vendorId,
|
|
|
|
// #withDrawerActions
|
|
openDrawer,
|
|
}) {
|
|
// Handle view customer drawer.
|
|
const handleVendorDrawer = () => {
|
|
openDrawer('vendor-details-drawer', { vendorId });
|
|
};
|
|
|
|
return <ButtonLink onClick={handleVendorDrawer}>{children}</ButtonLink>;
|
|
}
|
|
|
|
export const VendorDrawerLink = R.compose(withDrawerActions)(VendorDrawerLinkComponent);
|