mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-29 03:13:45 +01:00
25 lines
556 B
JavaScript
25 lines
556 B
JavaScript
import React from 'react';
|
|
import Tippy from '@tippyjs/react';
|
|
import StyledWrapper from './StyledWrapper';
|
|
|
|
const Dropdown = ({icon, children, onCreate, placement}) => {
|
|
return (
|
|
<StyledWrapper className="dropdown">
|
|
<Tippy
|
|
content={children}
|
|
placement={placement || "bottom-end"}
|
|
animation={false}
|
|
arrow={false}
|
|
onCreate={onCreate}
|
|
interactive={true}
|
|
trigger="click"
|
|
appendTo="parent"
|
|
>
|
|
{icon}
|
|
</Tippy>
|
|
</StyledWrapper>
|
|
);
|
|
};
|
|
|
|
export default Dropdown;
|