2021-09-24 20:10:03 +03:00
|
|
|
import { FC } from 'react';
|
|
|
|
import { ButtonDropdown, DropdownMenu, DropdownToggle } from 'reactstrap';
|
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
|
import { faEllipsisV as menuIcon } from '@fortawesome/free-solid-svg-icons';
|
|
|
|
import './DropdownBtnMenu.scss';
|
|
|
|
|
2021-09-24 21:04:16 +03:00
|
|
|
export interface DropdownBtnMenuProps {
|
2021-09-24 20:10:03 +03:00
|
|
|
isOpen: boolean;
|
|
|
|
toggle: () => void;
|
|
|
|
right?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const DropdownBtnMenu: FC<DropdownBtnMenuProps> = ({ isOpen, toggle, children, right = true }) => (
|
|
|
|
<ButtonDropdown toggle={toggle} isOpen={isOpen}>
|
|
|
|
<DropdownToggle size="sm" caret outline className="dropdown-btn-menu__dropdown-toggle">
|
|
|
|
<FontAwesomeIcon icon={menuIcon} />
|
|
|
|
</DropdownToggle>
|
|
|
|
<DropdownMenu right={right}>{children}</DropdownMenu>
|
|
|
|
</ButtonDropdown>
|
|
|
|
);
|