faet: Account Transcations.

This commit is contained in:
elforjani13
2021-10-13 19:51:52 +02:00
parent 369734ab18
commit 4ba750fe11
7 changed files with 355 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
import React from 'react';
import classNames from 'classnames';
import {
Button,
PopoverInteractionKind,
MenuItem,
Classes,
Position,
} from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import { Icon } from 'components';
export const CashFlowMenuItems = ({ text, items, onItemSelect }) => {
// Menu items renderer.
const itemsRenderer = (item, { handleClick, modifiers, query }) => (
<MenuItem text={item.name} label={item.label} onClick={handleClick} />
);
const handleCashFlowMenuSelect = (type) => {
onItemSelect && onItemSelect(type);
};
return (
<Select
items={items}
itemRenderer={itemsRenderer}
onItemSelect={handleCashFlowMenuSelect}
popoverProps={{
minimal: true,
position: Position.BOTTOM_LEFT,
interactionKind: PopoverInteractionKind.CLICK,
modifiers: {
offset: { offset: '0, 4' },
},
}}
filterable={false}
>
<Button
text={text}
icon={<Icon icon={'plus-24'} iconSize={20} />}
// rightIcon={'caret-down'}
// className={classNames(Classes.MINIMAL, 'button--table-views')}
minimal={true}
/>
</Select>
);
};