mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
WIP: Arabic localization.|
This commit is contained in:
@@ -1,22 +1,25 @@
|
||||
import React from 'react';
|
||||
import { Button, MenuItem } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { Icon } from 'components';
|
||||
import { Position } from '@blueprintjs/core';
|
||||
import quickNewOptions from 'common/quickNewOptions';
|
||||
import { getQuickNewActions } from 'common/quickNewOptions';
|
||||
import { Select } from '@blueprintjs/select';
|
||||
|
||||
/**
|
||||
* Quick New Dropdown.
|
||||
*/
|
||||
function QuickNewDropdown() {
|
||||
export default function QuickNewDropdown() {
|
||||
const history = useHistory();
|
||||
const quickNewOptions = getQuickNewActions();
|
||||
|
||||
// Handle click quick new button.
|
||||
const handleClickQuickNew = ({ path }) => {
|
||||
history.push(`/${path}`);
|
||||
};
|
||||
|
||||
// Item renderer.
|
||||
const itemRenderer = (item, { handleClick, modifiers, query }) => (
|
||||
<MenuItem text={item.name} label={item.label} onClick={handleClick} />
|
||||
);
|
||||
@@ -37,6 +40,4 @@ function QuickNewDropdown() {
|
||||
/>
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
|
||||
export default QuickNewDropdown;
|
||||
}
|
||||
Reference in New Issue
Block a user