forked from M-Labs/web2019
21 lines
623 B
JavaScript
21 lines
623 B
JavaScript
import {OverlayTrigger, Tooltip} from "react-bootstrap";
|
|
import React from "react";
|
|
|
|
export function Notification({id, tip, content, sideMenuIsOpen, show, onHide}) {
|
|
return (
|
|
<OverlayTrigger
|
|
placement="top"
|
|
trigger={["click", "hover"]}
|
|
style={{display: 'inline'}}
|
|
show={show}
|
|
overlay={props => <Tooltip id={id} {...props}>{tip}</Tooltip>}
|
|
rootClose={!sideMenuIsOpen}
|
|
onToggle={onHide}
|
|
popperConfig={{
|
|
strategy: 'fixed'
|
|
}}
|
|
>
|
|
{content}
|
|
</OverlayTrigger>
|
|
)
|
|
} |