import React, { useMemo } from 'react';
import {
Menu,
Popover,
Button,
Position,
MenuItem,
Intent,
} from '@blueprintjs/core';
import intl from 'react-intl-universal';
import { Icon } from 'components';
import { safeCallback } from 'utils';
/**
* Row actions menu list.
*/
export function ActionMenuList({
row: { original },
payload: { onEditCurrency, onDeleteCurrency },
}) {
return (
);
}
/**
* Actions cell.
*/
export const ActionsCell = (props) => {
return (
}
>
} />
);
};
export function useCurrenciesTableColumns() {
return useMemo(
() => [
{
Header: intl.get('currency_name'),
accessor: 'currency_name',
width: 150,
},
{
Header: intl.get('currency_code'),
accessor: 'currency_code',
className: 'currency_code',
width: 120,
},
{
Header: 'Currency sign',
width: 120,
accessor: 'currency_sign'
},
{
id: 'actions',
Header: '',
Cell: ActionsCell,
className: 'actions',
width: 50,
disableResizing: true,
},
],
[],
);
}