2024-01-03 17:34:26 +08:00
|
|
|
import {OverlayTrigger, Tooltip} from "react-bootstrap";
|
2024-03-18 14:48:16 +08:00
|
|
|
import React from "react";
|
2024-01-05 13:15:43 +08:00
|
|
|
|
2024-03-18 14:48:16 +08:00
|
|
|
export function Notification({id, tip, content, sideMenuIsOpen, show, onHide}) {
|
2024-01-03 17:34:26 +08:00
|
|
|
return (
|
2024-03-18 14:48:16 +08:00
|
|
|
<OverlayTrigger
|
|
|
|
placement="top"
|
|
|
|
trigger={["click", "hover"]}
|
|
|
|
style={{display: 'inline'}}
|
|
|
|
show={show}
|
|
|
|
overlay={props => <Tooltip id={id} {...props}>{tip}</Tooltip>}
|
|
|
|
rootClose={!sideMenuIsOpen}
|
|
|
|
onToggle={onHide}
|
2024-03-19 10:53:22 +08:00
|
|
|
popperConfig={{
|
|
|
|
strategy: 'fixed'
|
|
|
|
}}
|
2024-03-18 14:48:16 +08:00
|
|
|
>
|
|
|
|
{content}
|
|
|
|
</OverlayTrigger>
|
2024-01-03 17:34:26 +08:00
|
|
|
)
|
|
|
|
}
|