web2019/static/js/shop/options/Notification.jsx

18 lines
546 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}
>
{content}
</OverlayTrigger>
)
}