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

21 lines
623 B
React
Raw Normal View History

import {OverlayTrigger, Tooltip} from "react-bootstrap";
import React from "react";
2024-01-05 13:15:43 +08:00
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>
)
}